fix: persist some dirs by default for home dirs too
This commit is contained in:
parent
6d12c775c8
commit
a2a0fb4a43
@ -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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user