2006-11-13 00:30:03 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
# The root device.
|
|
|
|
rootDevice = "/dev/hda1";
|
|
|
|
|
|
|
|
# The device on which GRUB should be installed (leave empty if you
|
|
|
|
# don't want GRUB to be installed).
|
|
|
|
grubDevice = "/dev/hda";
|
|
|
|
|
2006-11-13 12:41:27 +01:00
|
|
|
# Build boot scripts.
|
2006-11-13 17:19:57 +01:00
|
|
|
bootEnv = import ./boot-environment.nix {
|
2006-11-13 00:30:03 +01:00
|
|
|
autoDetectRootDevice = false;
|
|
|
|
inherit rootDevice;
|
2006-11-24 01:04:29 +01:00
|
|
|
stage2Init = ""; # Passed on the command line via Grub.
|
2006-11-13 12:41:27 +01:00
|
|
|
readOnlyRoot = false;
|
2006-11-13 00:30:03 +01:00
|
|
|
};
|
|
|
|
|
2006-11-13 12:41:27 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
with bootEnv;
|
2006-11-13 00:30:03 +01:00
|
|
|
|
|
|
|
rec {
|
|
|
|
|
|
|
|
|
|
|
|
systemConfiguration = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "system-configuration";
|
|
|
|
builder = ./system-configuration.sh;
|
|
|
|
inherit (pkgs) grub coreutils gnused gnugrep diffutils;
|
|
|
|
inherit grubDevice;
|
2006-11-13 12:41:27 +01:00
|
|
|
inherit bootStage2;
|
2006-11-24 00:22:43 +01:00
|
|
|
inherit grubMenuBuilder;
|
2006-11-13 00:30:03 +01:00
|
|
|
kernel = pkgs.kernel + "/vmlinuz";
|
|
|
|
initrd = initialRamdisk + "/initrd";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-24 00:22:43 +01:00
|
|
|
grubMenuBuilder = pkgs.genericSubstituter {
|
|
|
|
src = ./grub-menu-builder.sh;
|
|
|
|
isExecutable = true;
|
|
|
|
inherit (pkgs) bash;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-13 00:30:03 +01:00
|
|
|
}
|