mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-22 05:07:45 +03:00
b59cfde311
svn path=/nixos/trunk/; revision=19317
47 lines
1000 B
Nix
47 lines
1000 B
Nix
{pkgs, config, ...}:
|
|
|
|
let
|
|
|
|
options = {
|
|
|
|
boot.postBootCommands = pkgs.lib.mkOption {
|
|
default = "";
|
|
example = "rm -f /var/log/messages";
|
|
merge = pkgs.lib.mergeStringOption;
|
|
description = ''
|
|
Shell commands to be executed just before Upstart is started.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
inherit (pkgs) substituteAll writeText coreutils utillinux udev;
|
|
kernel = config.boot.kernelPackages.kernel;
|
|
activateConfiguration = config.system.activationScripts.script;
|
|
|
|
bootStage2 = substituteAll {
|
|
src = ./stage-2-init.sh;
|
|
isExecutable = true;
|
|
inherit kernel activateConfiguration;
|
|
ttyGid = config.ids.gids.tty;
|
|
upstart = config.system.build.upstart;
|
|
path =
|
|
[ coreutils
|
|
utillinux
|
|
udev
|
|
];
|
|
postBootCommands = writeText "local-cmds"
|
|
''
|
|
${config.boot.postBootCommands}
|
|
${config.powerManagement.powerUpCommands}
|
|
'';
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
require = [options];
|
|
|
|
system.build.bootStage2 = bootStage2;
|
|
}
|