1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/configuration/system-configuration.nix
Eelco Dolstra acf656125c * Lots of refactoring.
* Clear the PATH in most scripts.  This helps to ensure purity.

svn path=/nixos/trunk/; revision=7299
2006-12-10 22:29:44 +00:00

64 lines
1.4 KiB
Nix

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";
# Build boot scripts.
bootEnv = import ./boot-environment.nix {
autoDetectRootDevice = false;
inherit rootDevice;
stage2Init = ""; # Passed on the command line via Grub.
readOnlyRoot = false;
};
# Extra kernel command line arguments.
extraKernelParams = [
"selinux=0"
"apm=on"
"acpi=on"
"vga=0x317"
"console=tty1"
"splash=verbose"
];
in
with bootEnv;
rec {
inherit upstartJobs;
systemConfiguration = pkgs.stdenvNew.mkDerivation {
name = "system-configuration";
builder = ./system-configuration.sh;
switchToConfiguration = ./switch-to-configuration.sh;
inherit (pkgs) grub coreutils gnused gnugrep diffutils findutils;
inherit grubDevice;
inherit bootStage2;
inherit activateConfiguration;
inherit grubMenuBuilder;
inherit etc;
kernel = pkgs.kernel + "/vmlinuz";
initrd = initialRamdisk + "/initrd";
inherit extraKernelParams;
# Most of these are needed by grub-install.
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils];
};
grubMenuBuilder = pkgs.substituteAll {
src = ../installer/grub-menu-builder.sh;
isExecutable = true;
inherit (pkgs) bash;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
};
}