Convert "boot/boot-stage-2.nix" to a configuration file.
svn path=/nixos/branches/fix-style/; revision=13684
This commit is contained in:
parent
7cdb7d38ef
commit
b67e2a12aa
@ -1,19 +1,23 @@
|
|||||||
{ substituteAll, writeText, coreutils
|
{pkgs, config, ...}:
|
||||||
, utillinux, kernel, udev, upstart
|
|
||||||
, activateConfiguration
|
|
||||||
|
|
||||||
, # Whether the root device is read-only and should be made writable
|
let
|
||||||
# through a unionfs.
|
inherit (pkgs) substituteAll writeText coreutils utillinux udev upstart;
|
||||||
isLiveCD
|
kernel = config.boot.kernelPackages.kernel;
|
||||||
|
activateConfiguration = config.system.activationScripts.script;
|
||||||
|
inherit (config.boot) isLiveCD;
|
||||||
|
|
||||||
, # Path for Upstart jobs. Should be quite minimal.
|
# Path for Upstart jobs. Should be quite minimal.
|
||||||
upstartPath
|
upstartPath = [
|
||||||
|
pkgs.coreutils
|
||||||
|
pkgs.findutils
|
||||||
|
pkgs.gnugrep
|
||||||
|
pkgs.gnused
|
||||||
|
pkgs.upstart
|
||||||
|
];
|
||||||
|
|
||||||
, # User-supplied command to be run just before Upstart is started.
|
bootLocal = config.boot.localCommands;
|
||||||
bootLocal ? ""
|
|
||||||
}:
|
|
||||||
|
|
||||||
substituteAll {
|
bootStage2 = substituteAll {
|
||||||
src = ./boot-stage-2-init.sh;
|
src = ./boot-stage-2-init.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit kernel upstart isLiveCD activateConfiguration upstartPath;
|
inherit kernel upstart isLiveCD activateConfiguration upstartPath;
|
||||||
@ -24,4 +28,24 @@ substituteAll {
|
|||||||
upstart
|
upstart
|
||||||
];
|
];
|
||||||
bootLocal = writeText "local-cmds" bootLocal;
|
bootLocal = writeText "local-cmds" bootLocal;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
require = [
|
||||||
|
# config.boot.localCommands
|
||||||
|
# config.boot.kernelPackages
|
||||||
|
|
||||||
|
# config.system.activationScripts
|
||||||
|
(import ../system/activate-configuration.nix)
|
||||||
|
|
||||||
|
# config.system.build
|
||||||
|
(import ../system/system-options.nix)
|
||||||
|
];
|
||||||
|
|
||||||
|
system = {
|
||||||
|
build = {
|
||||||
|
inherit bootStage2;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -2507,6 +2507,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
require = [
|
require = [
|
||||||
|
# boot (is it the right place ?)
|
||||||
|
(import ../boot/boot-stage-2.nix)
|
||||||
|
|
||||||
# system
|
# system
|
||||||
(import ../system/system-options.nix)
|
(import ../system/system-options.nix)
|
||||||
(import ../system/activate-configuration.nix)
|
(import ../system/activate-configuration.nix)
|
||||||
|
@ -191,20 +191,7 @@ rec {
|
|||||||
|
|
||||||
# The init script of boot stage 2, which is supposed to do
|
# The init script of boot stage 2, which is supposed to do
|
||||||
# everything else to bring up the system.
|
# everything else to bring up the system.
|
||||||
bootStage2 = import ../boot/boot-stage-2.nix {
|
bootStage2 = config.system.build.bootStage2;
|
||||||
inherit (pkgs) substituteAll writeText coreutils
|
|
||||||
utillinux udev upstart;
|
|
||||||
inherit kernel activateConfiguration;
|
|
||||||
inherit (config.boot) isLiveCD;
|
|
||||||
upstartPath = [
|
|
||||||
pkgs.coreutils
|
|
||||||
pkgs.findutils
|
|
||||||
pkgs.gnugrep
|
|
||||||
pkgs.gnused
|
|
||||||
pkgs.upstart
|
|
||||||
];
|
|
||||||
bootLocal = config.boot.localCommands;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Script to build the Grub menu containing the current and previous
|
# Script to build the Grub menu containing the current and previous
|
||||||
|
Loading…
Reference in New Issue
Block a user