aboutsummaryrefslogtreecommitdiff
path: root/snowfall/modules/nixos/system/impermanence
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-02-08 14:09:56 -0800
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:50 -0700
commitd4b81d128f5e9525bd29b4771ac566e00cc831d4 (patch)
tree5ea81e7d700e83d591a88386c993bc246352645b /snowfall/modules/nixos/system/impermanence
parent4b2050f8762b2880277c0762efc925991a034892 (diff)
migration: configure home impermanence from system
Diffstat (limited to 'snowfall/modules/nixos/system/impermanence')
-rw-r--r--snowfall/modules/nixos/system/impermanence/default.nix22
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 = [