diff options
Diffstat (limited to 'snowfall/modules/nixos/system/impermanence')
| -rw-r--r-- | snowfall/modules/nixos/system/impermanence/default.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/snowfall/modules/nixos/system/impermanence/default.nix b/snowfall/modules/nixos/system/impermanence/default.nix index c7c86d8..b82579b 100644 --- a/snowfall/modules/nixos/system/impermanence/default.nix +++ b/snowfall/modules/nixos/system/impermanence/default.nix @@ -5,12 +5,32 @@ with lib; with lib.${namespace}; let in { options.${namespace}.system.impermanence = with types; { enable = mkEnableOption "root impermanence"; + + location = mkOption { + type = str; + default = "/persist/system"; + }; + + #TODO: multi-user support + home = { + enable = mkEnableOption "home impermanence"; + + location = mkOption { + type = str; + default = "/persist/home"; + }; + + secure.location = mkOption { + type = str; + default = "/persist/secure/home"; + }; + }; }; config = mkIf cfg.enable { programs.fuse.userAllowOther = true; - environment.persistence."/persist/system" = { + environment.persistence.${cfg.location} = { hideMounts = true; directories = [ |