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-26 23:57:35 +01:00
|
|
|
# Extra kernel command line arguments.
|
2006-11-27 14:59:50 +01:00
|
|
|
extraKernelParams = [
|
|
|
|
"selinux=0"
|
|
|
|
"apm=on"
|
|
|
|
"acpi=on"
|
|
|
|
"vga=0x317"
|
|
|
|
"console=tty1"
|
|
|
|
"splash=verbose"
|
|
|
|
];
|
2006-11-26 23:57:35 +01:00
|
|
|
|
2006-11-13 12:41:27 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
with bootEnv;
|
2006-11-13 00:30:03 +01:00
|
|
|
|
|
|
|
rec {
|
|
|
|
|
2006-11-28 23:27:56 +01:00
|
|
|
inherit upstartJobs;
|
|
|
|
|
2006-11-13 00:30:03 +01:00
|
|
|
|
|
|
|
systemConfiguration = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "system-configuration";
|
|
|
|
builder = ./system-configuration.sh;
|
2006-12-10 01:04:58 +01:00
|
|
|
inherit (pkgs) grub coreutils gnused gnugrep diffutils findutils;
|
2006-11-13 00:30:03 +01:00
|
|
|
inherit grubDevice;
|
2006-11-13 12:41:27 +01:00
|
|
|
inherit bootStage2;
|
2006-12-10 01:04:58 +01:00
|
|
|
inherit activateConfiguration;
|
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-26 23:57:35 +01:00
|
|
|
inherit extraKernelParams;
|
2006-11-13 00:30:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-24 00:22:43 +01:00
|
|
|
grubMenuBuilder = pkgs.genericSubstituter {
|
2006-11-28 11:45:21 +01:00
|
|
|
src = ../installer/grub-menu-builder.sh;
|
2006-11-24 00:22:43 +01:00
|
|
|
isExecutable = true;
|
|
|
|
inherit (pkgs) bash;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-13 00:30:03 +01:00
|
|
|
}
|