* Make modules/system/boot/stage-1.nix a proper module that exports
the initial ramdisk as config.system.build.bootStage1. svn path=/nixos/branches/modular-nixos/; revision=15739
This commit is contained in:
parent
47f70fda2f
commit
7ac0b3aaea
15
default.nix
15
default.nix
@ -24,21 +24,6 @@ in
|
||||
config
|
||||
;
|
||||
|
||||
inherit (system.nixosTools)
|
||||
nixosCheckout
|
||||
nixosHardwareScan
|
||||
nixosInstall
|
||||
nixosRebuild
|
||||
nixosGenSeccureKeys
|
||||
;
|
||||
|
||||
inherit (system.initialRamdiskStuff)
|
||||
bootStage1
|
||||
extraUtils
|
||||
initialRamdisk
|
||||
modulesClosure
|
||||
;
|
||||
|
||||
nix = system.config.environment.nix;
|
||||
|
||||
nixFallback = (import nixpkgs {}).nixUnstable;
|
||||
|
@ -1,17 +1,13 @@
|
||||
# This Nix expression builds the initial ramdisk, which contains an
|
||||
# init script that performs the first stage of booting the system: it
|
||||
# loads the modules necessary to mount the root file system, then
|
||||
# calls the init in the root file system to start the second boot
|
||||
# stage.
|
||||
# This module builds the initial ramdisk, which contains an init
|
||||
# script that performs the first stage of booting the system: it loads
|
||||
# the modules necessary to mount the root file system, then calls the
|
||||
# init in the root file system to start the second boot stage.
|
||||
|
||||
{pkgs, config}:
|
||||
{pkgs, config, ...}:
|
||||
|
||||
let
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
modulesTree = config.system.modulesTree;
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
|
||||
# Determine the set of modules that we need to mount the root FS.
|
||||
@ -201,4 +197,9 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
system.build.bootStage1 = bootStage1;
|
||||
system.build.initialRamdisk = initialRamdisk;
|
||||
|
||||
}
|
||||
|
@ -446,6 +446,7 @@ in
|
||||
../modules/services/x11/xserver/default.nix
|
||||
../modules/system/activation/activation-script.nix
|
||||
../modules/system/boot/kernel.nix
|
||||
../modules/system/boot/stage-1.nix
|
||||
../modules/system/boot/stage-2.nix
|
||||
../modules/system/upstart-events/ctrl-alt-delete.nix
|
||||
../modules/system/upstart-events/halt.nix
|
||||
|
@ -26,14 +26,6 @@ rec {
|
||||
pkgs = import nixpkgs {system = platform;};
|
||||
|
||||
|
||||
# The initial ramdisk.
|
||||
initialRamdiskStuff = import ../modules/system/boot/stage-1.nix {
|
||||
inherit pkgs config;
|
||||
};
|
||||
|
||||
initialRamdisk = initialRamdiskStuff.initialRamdisk;
|
||||
|
||||
|
||||
# This attribute is responsible for creating boot entries for
|
||||
# child configuration. They are only (directly) accessible
|
||||
# when the parent configuration is boot default. For example,
|
||||
@ -66,7 +58,7 @@ rec {
|
||||
inherit children;
|
||||
configurationName = config.boot.configurationName;
|
||||
kernel = config.boot.kernelPackages.kernel + "/vmlinuz";
|
||||
initrd = initialRamdisk + "/initrd";
|
||||
initrd = config.system.build.initialRamdisk + "/initrd";
|
||||
# Most of these are needed by grub-install.
|
||||
path = [
|
||||
pkgs.coreutils
|
||||
|
Loading…
Reference in New Issue
Block a user