fix: persist some dirs by default for home dirs too

This commit is contained in:
Dmitriy Kholkin 2025-03-10 18:45:57 +03:00
parent 6d12c775c8
commit a2a0fb4a43
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2

View File

@ -1,10 +1,12 @@
{ {
config,
lib, lib,
... ...
}: }:
let let
inherit (lib) mkOption mkEnableOption; inherit (lib) mkOption mkEnableOption mkIf;
inherit (lib.types) listOf path str; inherit (lib.types) listOf path str;
cfg = config.persist;
in in
{ {
options = options =
@ -45,4 +47,12 @@ in
} // common; } // common;
}; };
}; };
config = mkIf cfg.enable {
# Persist by default
persist.cache.directories = [ ".cache" ];
persist.state = {
directories = [ ".local/share/nix" ];
};
};
} }