about summary refs log tree commit diff stats
path: root/modules/by-name/im/impermanence
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/im/impermanence/module.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/by-name/im/impermanence/module.nix b/modules/by-name/im/impermanence/module.nix
index 932dd658..78ad570f 100644
--- a/modules/by-name/im/impermanence/module.nix
+++ b/modules/by-name/im/impermanence/module.nix
@@ -31,6 +31,21 @@ 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 = [
@@ -59,7 +74,7 @@ in {
             "media"
             "repos"
             "documents"
-          ];
+          ] ++ cfg.userDirectories;
         };
 
         files = [