feat(flatpak): add portals and persist
This commit is contained in:
parent
0209929c94
commit
195878e780
17
global/flatpak/default.nix
Normal file
17
global/flatpak/default.nix
Normal file
|
@ -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" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue