Treat init-script as a boot loader
This commit is contained in:
parent
8b91a5f2ff
commit
b52117c34d
@ -23,7 +23,6 @@
|
||||
./hardware/network/rt73.nix
|
||||
./hardware/network/rtl8192c.nix
|
||||
./hardware/pcmcia.nix
|
||||
./installer/init-script/init-script.nix
|
||||
./installer/tools/nixos-checkout.nix
|
||||
./installer/tools/tools.nix
|
||||
./misc/assertions.nix
|
||||
@ -199,6 +198,7 @@
|
||||
./system/boot/loader/generations-dir/generations-dir.nix
|
||||
./system/boot/loader/grub/grub.nix
|
||||
./system/boot/loader/grub/memtest.nix
|
||||
./system/boot/loader/init-script/init-script.nix
|
||||
./system/boot/luksroot.nix
|
||||
./system/boot/modprobe.nix
|
||||
./system/boot/stage-1.nix
|
||||
|
@ -23,12 +23,7 @@ fi
|
||||
|
||||
# Install or update the bootloader.
|
||||
if [ "$action" = "switch" -o "$action" = "boot" ]; then
|
||||
|
||||
@installBootLoader@ @out@
|
||||
|
||||
if [ -n "@initScriptBuilder@" ]; then
|
||||
@initScriptBuilder@ @out@
|
||||
fi
|
||||
fi
|
||||
|
||||
# Activate the new configuration.
|
||||
|
@ -152,7 +152,6 @@ let
|
||||
installBootLoader =
|
||||
config.system.build.installBootLoader
|
||||
or "echo 'Warning: don't know how to make this configuration bootable; please enable a boot loader.' 1>&2; true";
|
||||
initScriptBuilder = config.system.build.initScriptBuilder;
|
||||
activationScript = config.system.activationScripts.script;
|
||||
nixosVersion = config.system.nixosVersion;
|
||||
|
||||
|
@ -6,7 +6,7 @@ export PATH=/empty
|
||||
for i in @path@; do PATH=$PATH:$i/bin; done
|
||||
|
||||
if test $# -ne 1; then
|
||||
echo "Usage: grub-menu-builder.sh DEFAULT-CONFIG"
|
||||
echo "Usage: init-script-builder.sh DEFAULT-CONFIG"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -41,10 +41,9 @@ in
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
config = mkIf config.boot.loader.initScript.enable {
|
||||
|
||||
system.build.initScriptBuilder =
|
||||
if config.boot.loader.initScript.enable then initScriptBuilder else "";
|
||||
system.build.installBootLoader = initScriptBuilder;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user