Add impermanence create option

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-30 00:13:21 +01:00
parent 3a03406b99
commit ba74461ed8
10 changed files with 71 additions and 50 deletions

View File

@@ -121,6 +121,16 @@ in
type = str;
readOnly = true;
};
create = mkOption {
type = enum [
"none"
"file"
"directory"
];
default = "none";
description = "Whether to create the file or directory in persistence if it does not exist.";
};
};
}
)
@@ -257,6 +267,7 @@ in
source=${lib.strings.escapeShellArg c._sourceRoot}
target=${lib.strings.escapeShellArg c._targetRoot}
path=${lib.strings.escapeShellArg c.path}
create=${lib.strings.escapeShellArg c.create}
${builtins.readFile ./scripts/start.sh}
'';
@@ -264,6 +275,7 @@ in
source=${lib.strings.escapeShellArg c._sourceRoot}
target=${lib.strings.escapeShellArg c._targetRoot}
path=${lib.strings.escapeShellArg c.path}
create=${lib.strings.escapeShellArg c.create}
${builtins.readFile ./scripts/stop.sh}
'';