To ease migration to systemd, generate units from the ‘jobs’ option

Also get rid of the ‘buildHook’ job option because it wasn't very useful.
This commit is contained in:
Eelco Dolstra
2012-06-16 00:19:43 -04:00
parent 66f4d10843
commit 4a95f8996b
15 changed files with 108 additions and 172 deletions

View File

@@ -159,12 +159,7 @@ in
environment.systemPackages = [ pkgs.nagios ];
jobs.nagios =
{ # Run `nagios -v' to check the validity of the configuration file so
# that a nixos-rebuild fails *before* we kill the running Nagios
# daemon.
buildHook = "${pkgs.nagios}/bin/nagios -v ${nagiosCfgFile}";
description = "Nagios monitoring daemon";
{ description = "Nagios monitoring daemon";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";