From 41b98b4a8a38ee9aa96a0cf42414e9308514fc66 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 12 Nov 2025 17:12:58 +0100 Subject: [PATCH] nixos: Shuffle definitions and deprecate system.extraSystemBuilderCmds Shuffle: The definitions are now combined into a single option. Since they have no interdependencies, that's ok, but you may notice this trivial change by a changed hash, and analyzing with nix-diff. Deprecation: Use the option `system.systemBuilderCommands` instead. --- nixos/modules/system/activation/top-level.nix | 14 ++------------ nixos/tests/switch-test.nix | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 9a1cde27bf77..f09bd38aa393 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -53,8 +53,6 @@ let ${config.boot.bootspec.writer} ${optionalString config.boot.bootspec.enableValidation ''${config.boot.bootspec.validator} "$out/${config.boot.bootspec.filename}"''} ''} - - ${config.system.extraSystemBuilderCmds} ''; # Putting it all together. This builds a store path containing @@ -129,6 +127,7 @@ in [ "system" "replaceRuntimeDependencies" ] [ "system" "replaceDependencies" "replacements" ] ) + (mkRenamedOptionModule [ "system" "extraSystemBuilderCmds" ] [ "system" "systemBuilderCommands" ]) ]; options = { @@ -213,15 +212,6 @@ in ''; }; - system.extraSystemBuilderCmds = mkOption { - type = types.lines; - internal = true; - default = ""; - description = '' - This code will be added to the builder creating the system store path. - ''; - }; - system.extraDependencies = mkOption { type = types.listOf types.pathInStore; default = [ ]; @@ -343,7 +333,7 @@ in } ]; - system.extraSystemBuilderCmds = + system.systemBuilderCommands = optionalString config.system.copySystemConfiguration '' ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" }' \ "$out/configuration.nix" diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix index c01dbc90ec7a..3ff6dcbc4e02 100644 --- a/nixos/tests/switch-test.nix +++ b/nixos/tests/switch-test.nix @@ -64,7 +64,7 @@ in boot.loader.grub.enable = false; specialisation = rec { - brokenInitInterface.configuration.config.system.extraSystemBuilderCmds = '' + brokenInitInterface.configuration.config.system.systemBuilderCommands = '' echo "systemd 0" > $out/init-interface-version '';