vars: rename createFile -> persist

This commit is contained in:
DavHau
2025-01-08 11:55:12 +07:00
parent f743ec2616
commit bbe37a998f
6 changed files with 12 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ let
promptsToFilesScript = concatMapStrings promptToFile;
filePromptNames = attrNames (filterAttrs (_name: prompt: prompt.createFile) config.prompts);
filePromptNames = attrNames (filterAttrs (_name: prompt: prompt.persist) config.prompts);
in
{
finalScript = mkOptionDefault (

View File

@@ -253,6 +253,9 @@ in
default = { };
type = attrsOf (
submodule (prompt: {
imports = [
(lib.mkRenamedOptionModule [ "createFile" ] [ "persist" ])
];
options = {
name = lib.mkOption {
description = ''
@@ -263,7 +266,7 @@ in
default = prompt.config._module.args.name;
defaultText = "Name of the prompt";
};
createFile = lib.mkOption {
persist = lib.mkOption {
description = ''
Whether the prompted value should be stored in a file with the same name as the prompt.