mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
nixos/activation/bootspec: module-ify
This does the following: * turns bootspec into a NixOS module * validates bootspecs with Cue * exposes internal knobs
This commit is contained in:
parent
9a431a57b1
commit
348ba1b33c
4 changed files with 81 additions and 23 deletions
|
@ -9,14 +9,6 @@ let
|
|||
"${config.system.boot.loader.kernelFile}";
|
||||
initrdPath = "${config.system.build.initialRamdisk}/" +
|
||||
"${config.system.boot.loader.initrdFile}";
|
||||
|
||||
bootSpec = import ./bootspec.nix {
|
||||
inherit
|
||||
config
|
||||
pkgs
|
||||
lib
|
||||
children;
|
||||
};
|
||||
in ''
|
||||
mkdir $out
|
||||
|
||||
|
@ -88,7 +80,8 @@ let
|
|||
echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies
|
||||
|
||||
${optionalString (!config.boot.isContainer) ''
|
||||
${bootSpec.writer}
|
||||
${config.boot.bootspec.writer}
|
||||
${config.boot.bootspec.validator} "$out/bootspec/${config.boot.bootspec.filename}"
|
||||
''}
|
||||
|
||||
${config.system.extraSystemBuilderCmds}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue