nixos/global/flatpak/default.nix

26 lines
443 B
Nix
Raw Normal View History

2025-01-13 11:52:09 +08:00
{
pkgs,
lib,
config,
...
}:
with lib;
let
2024-07-29 15:40:41 +08:00
cfg = config.global.flatpak;
2025-01-13 11:52:09 +08:00
in
{
2024-07-29 15:40:41 +08:00
options.global.flatpak = {
enable = mkEnableOption "flatpak sandbox";
};
config = mkIf cfg.enable {
services.flatpak.enable = true;
xdg.portal.enable = true;
2025-01-13 11:52:09 +08:00
users.home.persist.directories = [
".local/share/flatpak"
".var"
];
2024-07-29 15:40:41 +08:00
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/flatpak" ];
};
}