summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/by-name/im/impermanence/module.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/by-name/im/impermanence/module.nix b/modules/by-name/im/impermanence/module.nix
index a0c308d5..8172d90a 100644
--- a/modules/by-name/im/impermanence/module.nix
+++ b/modules/by-name/im/impermanence/module.nix
@@ -24,13 +24,19 @@ in {
mode = lib.mkOption {
type = lib.types.str;
};
+ group = lib.mkOption {
+ type = lib.types.str;
+ };
+ user = lib.mkOption {
+ type = lib.types.str;
+ };
};
}));
description = "The directories to persist";
};
userDirectories = lib.mkOption {
- type = lib.types.attrsOf (lib.types.listOf (lib.types.either lib.types.str (lib.types.submodule {
+ type = lib.types.nullOr (lib.types.attrsOf (lib.types.listOf (lib.types.either lib.types.str (lib.types.submodule {
options = {
directory = lib.mkOption {
type = lib.types.str;
@@ -38,9 +44,15 @@ in {
mode = lib.mkOption {
type = lib.types.str;
};
+ group = lib.mkOption {
+ type = lib.types.str;
+ };
+ user = lib.mkOption {
+ type = lib.types.str;
+ };
};
- })));
- default = [];
+ }))));
+ default = null;
description = "The directories to persist, for each user.";
};
};
@@ -54,7 +66,7 @@ in {
hideMounts = true;
inherit (cfg) directories;
- users = userDirectories;
+ users = lib.mkIf (cfg.userDirectories != null) userDirectories;
files = [
"/etc/machine-id"