diff options
-rw-r--r-- | modules/nixos/sils/default.nix | 1 | ||||
-rw-r--r-- | modules/nixos/sils/impermanence.nix | 31 | ||||
-rw-r--r-- | modules/nixos/sils/roles.nix | 1 | ||||
-rw-r--r-- | sys/default.nix | 1 | ||||
-rw-r--r-- | sys/impermanence/default.nix | 22 |
5 files changed, 33 insertions, 23 deletions
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix index 7135ff9..a0fe1ac 100644 --- a/modules/nixos/sils/default.nix +++ b/modules/nixos/sils/default.nix @@ -5,6 +5,7 @@ ./environment.nix ./font.nix ./hyprland.nix + ./impermanence.nix ./meta.nix ./networking.nix ./nix.nix diff --git a/modules/nixos/sils/impermanence.nix b/modules/nixos/sils/impermanence.nix new file mode 100644 index 0000000..55651e0 --- /dev/null +++ b/modules/nixos/sils/impermanence.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + ... +}: let + cfg = config.sils.impermanence; +in { + options.sils.impermanence.enable = lib.mkEnableOption "impermanence to persist directories"; + config = lib.mkIf cfg.enable { + environment.persistence."/srv".directories = [ + { + directory = "/var/lib/bluetooth"; + user = "root"; + group = "root"; + mode = "0700"; + } + { + directory = "/root"; + user = "root"; + group = "root"; + mode = "0700"; + } + { + directory = "/var/lib/waydroid"; + user = "root"; + group = "root"; + mode = "0700"; + } + ]; + }; +} diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix index e973759..94511b9 100644 --- a/modules/nixos/sils/roles.nix +++ b/modules/nixos/sils/roles.nix @@ -9,6 +9,7 @@ in { environment.enable = true; font.enable = true; hyprland.enable = true; + impermanence.enable = true; networking.enable = true; nix-config.enable = true; plymouth.enable = true; diff --git a/sys/default.nix b/sys/default.nix index 3955d12..c88c018 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -1,6 +1,5 @@ {...}: { imports = [ - ./impermanence ./keyboard ./opengl ./packages diff --git a/sys/impermanence/default.nix b/sys/impermanence/default.nix deleted file mode 100644 index 82765db..0000000 --- a/sys/impermanence/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{...}: { - environment.persistence."/srv".directories = [ - { - directory = "/var/lib/bluetooth"; - user = "root"; - group = "root"; - mode = "0700"; - } - { - directory = "/root"; - user = "root"; - group = "root"; - mode = "0700"; - } - { - directory = "/var/lib/waydroid"; - user = "root"; - group = "root"; - mode = "0700"; - } - ]; -} |