From 859c76c505a4f2b80c32c64a22e51e139b6d68fa Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 18 Nov 2024 16:22:41 +0100 Subject: [PATCH] nixos/tools: add enable options to manual E.g. when overriding `nix` with `pkgs.lix`, `nixos-option` will fail. Given that I haven't used it in a very long time, I wanted to disable it, but finding an option to turn off `nixos-option` is kinda hard given that the options are generated here using `mkToolModule`. I assumed that this isn't possible until I learned that `system.tools.X.enable` exists. To me, this is a clear sign that these shouldn't be internal. --- nixos/modules/installer/tools/tools.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 0887dd56a67e8..2eb70e5211b68 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -218,7 +218,7 @@ in mkToolModule = { name, package ? pkgs.${name} }: { config, ... }: { options.system.tools.${name}.enable = lib.mkEnableOption "${name} script" // { default = config.nix.enable && ! config.system.disableInstallerTools; - internal = true; + defaultText = "config.nix.enable && !config.system.disableInstallerTools"; }; config = lib.mkIf config.system.tools.${name}.enable {