mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-22 05:07:45 +03:00
0a0260514d
such a good name (local to what?). svn path=/nixos/branches/modular-nixos/; revision=15879
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
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 upstart;
|
|
kernel = config.boot.kernelPackages.kernel;
|
|
activateConfiguration = config.system.activationScripts.script;
|
|
|
|
# Path for Upstart jobs. Should be quite minimal.
|
|
upstartPath =
|
|
[ pkgs.coreutils
|
|
pkgs.findutils
|
|
pkgs.gnugrep
|
|
pkgs.gnused
|
|
pkgs.upstart
|
|
];
|
|
|
|
bootStage2 = substituteAll {
|
|
src = ./stage-2-init.sh;
|
|
isExecutable = true;
|
|
inherit kernel upstart activateConfiguration upstartPath;
|
|
path =
|
|
[ coreutils
|
|
utillinux
|
|
udev
|
|
upstart
|
|
];
|
|
postBootCommands = writeText "local-cmds" config.boot.postBootCommands;
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
require = [options];
|
|
|
|
system.build.bootStage2 = bootStage2;
|
|
}
|