diff --git a/global/flatpak/default.nix b/global/flatpak/default.nix new file mode 100644 index 00000000..48bafda6 --- /dev/null +++ b/global/flatpak/default.nix @@ -0,0 +1,17 @@ +{ pkgs +, lib +, config +, ... }: with lib; let + cfg = config.global.flatpak; +in { + options.global.flatpak = { + enable = mkEnableOption "flatpak sandbox"; + }; + + config = mkIf cfg.enable { + services.flatpak.enable = true; + xdg.portal.enable = true; + users.home.persist.directories = [ ".local/share/flatpak" ]; + environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/flatpak" ]; + }; +}