about summary refs log tree commit diff stats
path: root/modules/by-name/im
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/im')
-rw-r--r--modules/by-name/im/impermanence/module.nix36
-rw-r--r--modules/by-name/im/imv/module.nix9
2 files changed, 40 insertions, 5 deletions
diff --git a/modules/by-name/im/impermanence/module.nix b/modules/by-name/im/impermanence/module.nix
index 94789755..78ad570f 100644
--- a/modules/by-name/im/impermanence/module.nix
+++ b/modules/by-name/im/impermanence/module.nix
@@ -1,6 +1,16 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   config,
   lib,
+  modules,
   ...
 }: let
   cfg = config.soispha.impermanence;
@@ -21,8 +31,27 @@ in {
       }));
       description = "The directories to persist";
     };
+
+    userDirectories = lib.mkOption {
+      type = lib.types.listOf (lib.types.either lib.types.str (lib.types.submodule {
+        options = {
+          directory = lib.mkOption {
+            type = lib.types.str;
+          };
+          mode = lib.mkOption {
+            type = lib.types.str;
+          };
+        };
+      }));
+      default = [];
+      description = "The directories to persist";
+    };
   };
 
+  imports = [
+    modules.impermanence.nixosModules.impermanence
+  ];
+
   config = lib.mkIf cfg.enable {
     environment.persistence = {
       "/srv" = {
@@ -39,16 +68,13 @@ in {
             ".local/state/wireplumber"
 
             ".config/Signal"
-            ".config/Element"
-            ".config/iamb/profiles"
 
             ".cache"
-            ".mozilla/firefox"
 
             "media"
             "repos"
-            "school"
-          ];
+            "documents"
+          ] ++ cfg.userDirectories;
         };
 
         files = [
diff --git a/modules/by-name/im/imv/module.nix b/modules/by-name/im/imv/module.nix
index 0a324e01..fdf95982 100644
--- a/modules/by-name/im/imv/module.nix
+++ b/modules/by-name/im/imv/module.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   config,
   lib,