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.
This commit is contained in:
Robert Hensing
2025-11-12 17:12:58 +01:00
parent ff7090395a
commit 41b98b4a8a
2 changed files with 3 additions and 13 deletions

View File

@@ -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" <nixos-config>}' \
"$out/configuration.nix"