From f2ab298caaca196e13a49421111419f363517bbc Mon Sep 17 00:00:00 2001 From: a-kenji Date: Sun, 2 Feb 2025 16:46:30 +0700 Subject: [PATCH] vars/interface: Change `prompt.persist` default to false Change `prompt.persist` default to false. We want a consistent default that is not conditionally dependent on other values. This makes communication on how the functionality is used more consistent and easier understood. --- nixosModules/clanCore/vars/interface.nix | 2 +- pkgs/clan-cli/tests/test_vars.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixosModules/clanCore/vars/interface.nix b/nixosModules/clanCore/vars/interface.nix index 7d7535a75..b6cf78874 100644 --- a/nixosModules/clanCore/vars/interface.nix +++ b/nixosModules/clanCore/vars/interface.nix @@ -282,7 +282,7 @@ in ``` ''; type = bool; - default = generator.config.script == ""; + default = false; }; description = lib.mkOption { description = '' diff --git a/pkgs/clan-cli/tests/test_vars.py b/pkgs/clan-cli/tests/test_vars.py index 382854831..eb3bc8f50 100644 --- a/pkgs/clan-cli/tests/test_vars.py +++ b/pkgs/clan-cli/tests/test_vars.py @@ -600,6 +600,7 @@ def test_api_set_prompts( config["nixpkgs"]["hostPlatform"] = "x86_64-linux" my_generator = config["clan"]["core"]["vars"]["generators"]["my_generator"] my_generator["prompts"]["prompt1"]["type"] = "line" + my_generator["prompts"]["prompt1"]["persist"] = True my_generator["files"]["prompt1"]["secret"] = False flake.refresh()