* Allow Upstart jobs to declare additional /etc files.
svn path=/nixos/trunk/; revision=8505
This commit is contained in:
parent
5cf236ba04
commit
bf92844f16
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ import ../upstart-jobs/gather.nix {
|
||||
|
||||
# For the built-in logd job.
|
||||
++ [
|
||||
(pkgs.upstart // {extraPath = [];})
|
||||
(pkgs.upstart // {extraPath = []; extraEtc = [];})
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -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 [];
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user