f2780fdc62
for building parts of the system. E.g. $ nix-build /etc/nixos/nixos -A upstartJobs.xserver to build the Upstart job for the X server, or $ nix-build /etc/nixos/nixos -A kernel to build the NixOS kernel. * /etc/profile.sh: if ~/.nix-defexpr doesn't exist yet, create it as a directory and add links to root's channels, /etc/nixos/nixos and /etc/nixos/install-source.nix (as "nixpkgs_sys"). * boot.useKernel -> boot.kernel. svn path=/nixos/trunk/; revision=9334
28 lines
752 B
Nix
28 lines
752 B
Nix
{runCommand}: job:
|
|
|
|
(
|
|
if job ? jobDrv then
|
|
job.jobDrv
|
|
else
|
|
(
|
|
runCommand ("upstart-" + job.name) {inherit (job) job; jobName = job.name;}
|
|
"ensureDir $out/etc/event.d; echo \"$job\" > $out/etc/event.d/$jobName"
|
|
)
|
|
)
|
|
|
|
//
|
|
|
|
{
|
|
# Allow jobs to declare extra packages that should be added to the
|
|
# system path.
|
|
extraPath = if job ? extraPath then job.extraPath else [];
|
|
|
|
# Allow jobs to declare extra files that should be added to /etc.
|
|
extraEtc = if job ? extraEtc then job.extraEtc else [];
|
|
|
|
# Allow jobs to declare user accounts that should be created.
|
|
users = if job ? users then job.users else [];
|
|
|
|
# Allow jobs to declare groups that should be created.
|
|
groups = if job ? groups then job.groups else [];
|
|
}
|