nixos/global/flatpak/default.nix

18 lines
422 B
Nix
Raw Normal View History

2024-07-29 15:40:41 +08:00
{ 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;
2024-08-07 22:49:43 +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" ];
};
}