Skip to content

Commit 41b98b4

Browse files
committed
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.
1 parent ff70903 commit 41b98b4

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

nixos/modules/system/activation/top-level.nix

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ let
5353
${config.boot.bootspec.writer}
5454
${optionalString config.boot.bootspec.enableValidation ''${config.boot.bootspec.validator} "$out/${config.boot.bootspec.filename}"''}
5555
''}
56-
57-
${config.system.extraSystemBuilderCmds}
5856
'';
5957

6058
# Putting it all together. This builds a store path containing
@@ -129,6 +127,7 @@ in
129127
[ "system" "replaceRuntimeDependencies" ]
130128
[ "system" "replaceDependencies" "replacements" ]
131129
)
130+
(mkRenamedOptionModule [ "system" "extraSystemBuilderCmds" ] [ "system" "systemBuilderCommands" ])
132131
];
133132

134133
options = {
@@ -213,15 +212,6 @@ in
213212
'';
214213
};
215214

216-
system.extraSystemBuilderCmds = mkOption {
217-
type = types.lines;
218-
internal = true;
219-
default = "";
220-
description = ''
221-
This code will be added to the builder creating the system store path.
222-
'';
223-
};
224-
225215
system.extraDependencies = mkOption {
226216
type = types.listOf types.pathInStore;
227217
default = [ ];
@@ -343,7 +333,7 @@ in
343333
}
344334
];
345335

346-
system.extraSystemBuilderCmds =
336+
system.systemBuilderCommands =
347337
optionalString config.system.copySystemConfiguration ''
348338
ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" <nixos-config>}' \
349339
"$out/configuration.nix"

nixos/tests/switch-test.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ in
6464
boot.loader.grub.enable = false;
6565

6666
specialisation = rec {
67-
brokenInitInterface.configuration.config.system.extraSystemBuilderCmds = ''
67+
brokenInitInterface.configuration.config.system.systemBuilderCommands = ''
6868
echo "systemd 0" > $out/init-interface-version
6969
'';
7070

0 commit comments

Comments
 (0)