* Allow Upstart jobs to declare additional /etc files.

svn path=/nixos/trunk/; revision=8505
This commit is contained in:
Eelco Dolstra 2007-03-30 12:55:09 +00:00
parent 5cf236ba04
commit bf92844f16
5 changed files with 18 additions and 5 deletions

View file

@ -1,4 +1,4 @@
{config, pkgs, upstartJobs, systemPath, wrapperDir, defaultShell}:
{config, pkgs, upstartJobs, systemPath, wrapperDir, defaultShell, extraEtc}:
let
@ -144,5 +144,9 @@ import ../helpers/make-etc.nix {
"chsh"
"common"
]
);
)
# Additional /etc files declared by Upstart jobs.
++ extraEtc;
}

View file

@ -149,6 +149,7 @@ rec {
# The static parts of /etc.
etc = import ./etc.nix {
inherit config pkgs upstartJobs systemPath wrapperDir defaultShell;
extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs);
};

View file

@ -210,7 +210,7 @@ import ../upstart-jobs/gather.nix {
# For the built-in logd job.
++ [
(pkgs.upstart // {extraPath = [];})
(pkgs.upstart // {extraPath = []; extraEtc = [];})
];
}

View file

@ -8,7 +8,8 @@
//
# Allow jobs to declare extra packages that should be added to the
# system path.
# system path, as well as extra files that should be added to /etc.
{
extraPath = if job ? extraPath then job.extraPath else [];
}
extraEtc = if job ? extraEtc then job.extraEtc else [];
}

View file

@ -228,6 +228,13 @@ rec {
xorg.xset # used by startkde, non-essential
];
extraEtc =
optional (sessionType == "kde")
{ source = "${xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
job = "
#start on network-interfaces