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/rt73.nix
|
||||||
./hardware/network/rtl8192c.nix
|
./hardware/network/rtl8192c.nix
|
||||||
./hardware/pcmcia.nix
|
./hardware/pcmcia.nix
|
||||||
./installer/init-script/init-script.nix
|
|
||||||
./installer/tools/nixos-checkout.nix
|
./installer/tools/nixos-checkout.nix
|
||||||
./installer/tools/tools.nix
|
./installer/tools/tools.nix
|
||||||
./misc/assertions.nix
|
./misc/assertions.nix
|
||||||
|
@ -199,6 +198,7 @@
|
||||||
./system/boot/loader/generations-dir/generations-dir.nix
|
./system/boot/loader/generations-dir/generations-dir.nix
|
||||||
./system/boot/loader/grub/grub.nix
|
./system/boot/loader/grub/grub.nix
|
||||||
./system/boot/loader/grub/memtest.nix
|
./system/boot/loader/grub/memtest.nix
|
||||||
|
./system/boot/loader/init-script/init-script.nix
|
||||||
./system/boot/luksroot.nix
|
./system/boot/luksroot.nix
|
||||||
./system/boot/modprobe.nix
|
./system/boot/modprobe.nix
|
||||||
./system/boot/stage-1.nix
|
./system/boot/stage-1.nix
|
||||||
|
|
|
@ -23,12 +23,7 @@ fi
|
||||||
|
|
||||||
# Install or update the bootloader.
|
# Install or update the bootloader.
|
||||||
if [ "$action" = "switch" -o "$action" = "boot" ]; then
|
if [ "$action" = "switch" -o "$action" = "boot" ]; then
|
||||||
|
|
||||||
@installBootLoader@ @out@
|
@installBootLoader@ @out@
|
||||||
|
|
||||||
if [ -n "@initScriptBuilder@" ]; then
|
|
||||||
@initScriptBuilder@ @out@
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Activate the new configuration.
|
# Activate the new configuration.
|
||||||
|
|
|
@ -152,7 +152,6 @@ let
|
||||||
installBootLoader =
|
installBootLoader =
|
||||||
config.system.build.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";
|
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;
|
activationScript = config.system.activationScripts.script;
|
||||||
nixosVersion = config.system.nixosVersion;
|
nixosVersion = config.system.nixosVersion;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ export PATH=/empty
|
||||||
for i in @path@; do PATH=$PATH:$i/bin; done
|
for i in @path@; do PATH=$PATH:$i/bin; done
|
||||||
|
|
||||||
if test $# -ne 1; then
|
if test $# -ne 1; then
|
||||||
echo "Usage: grub-menu-builder.sh DEFAULT-CONFIG"
|
echo "Usage: init-script-builder.sh DEFAULT-CONFIG"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -41,10 +41,9 @@ in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = {
|
config = mkIf config.boot.loader.initScript.enable {
|
||||||
|
|
||||||
system.build.initScriptBuilder =
|
system.build.installBootLoader = initScriptBuilder;
|
||||||
if config.boot.loader.initScript.enable then initScriptBuilder else "";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue