2006-11-02 18:56:50 +01:00
|
|
|
rec {
|
|
|
|
|
|
|
|
pkgs = import ./pkgs/top-level/all-packages.nix {};
|
|
|
|
|
2006-11-02 23:48:01 +01:00
|
|
|
pkgsDiet = import ./pkgs/top-level/all-packages.nix {
|
|
|
|
bootStdenv = pkgs.useDietLibC pkgs.stdenv;
|
|
|
|
};
|
|
|
|
|
2006-11-02 18:56:50 +01:00
|
|
|
stdenvLinuxStuff = import ./pkgs/stdenv/linux {
|
|
|
|
system = pkgs.stdenv.system;
|
|
|
|
allPackages = import ./pkgs/top-level/all-packages.nix;
|
|
|
|
};
|
|
|
|
|
|
|
|
bash = pkgs.bash;
|
|
|
|
|
2006-11-02 23:48:01 +01:00
|
|
|
|
2006-11-03 01:36:08 +01:00
|
|
|
# Determine the set of modules that we need to mount the root FS.
|
|
|
|
modulesClosure = import ./modules-closure.nix {
|
|
|
|
inherit (pkgs) stdenv kernel;
|
|
|
|
rootModules = "ide-cd";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-02 23:48:01 +01:00
|
|
|
# The init script of boot stage 1 (loading kernel modules for
|
|
|
|
# mounting the root FS).
|
|
|
|
bootStage1 = import ./boot-stage-1.nix {
|
2006-11-03 01:36:08 +01:00
|
|
|
inherit (pkgs) genericSubstituter
|
|
|
|
module_init_tools utillinux kernel;
|
2006-11-02 23:48:01 +01:00
|
|
|
shell = stdenvLinuxStuff.bootstrapTools.bash;
|
|
|
|
staticTools = stdenvLinuxStuff.staticTools;
|
|
|
|
};
|
2006-11-02 18:56:50 +01:00
|
|
|
|
2006-11-02 23:48:01 +01:00
|
|
|
|
|
|
|
# The closure of the init script of boot stage 1 is what we put in
|
|
|
|
# the initial RAM disk.
|
2006-11-02 18:56:50 +01:00
|
|
|
initialRamdisk = import ./make-initrd.nix {
|
|
|
|
inherit (pkgs) stdenv cpio;
|
2006-11-02 23:48:01 +01:00
|
|
|
packages = [];
|
|
|
|
init = bootStage1;
|
2006-11-02 18:56:50 +01:00
|
|
|
};
|
|
|
|
|
2006-11-02 23:48:01 +01:00
|
|
|
|
|
|
|
# Create an ISO image containing the isolinux boot loader, the
|
|
|
|
# kernel, and initrd produced above.
|
2006-11-02 18:56:50 +01:00
|
|
|
rescueCD = import ./make-iso9660-image.nix {
|
|
|
|
inherit (pkgs) stdenv cdrtools;
|
|
|
|
isoName = "nixos.iso";
|
|
|
|
|
|
|
|
contents = [
|
|
|
|
{ source = pkgs.syslinux + "/lib/syslinux/isolinux.bin";
|
|
|
|
target = "isolinux/isolinux.bin";
|
|
|
|
}
|
|
|
|
{ source = ./isolinux.cfg;
|
|
|
|
target = "isolinux/isolinux.cfg";
|
|
|
|
}
|
|
|
|
{ source = pkgs.kernel + "/vmlinuz";
|
|
|
|
target = "isolinux/vmlinuz";
|
|
|
|
}
|
|
|
|
{ source = initialRamdisk + "/initrd";
|
|
|
|
target = "isolinux/initrd";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
bootable = true;
|
|
|
|
bootImage = "isolinux/isolinux.bin";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|