2007-11-15 18:16:16 +01:00
|
|
|
{config, pkgs, nix, nixEnvVars}:
|
2006-12-09 04:11:14 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "nix-daemon";
|
|
|
|
|
|
|
|
job = "
|
|
|
|
start on startup
|
|
|
|
stop on shutdown
|
2007-02-22 19:04:18 +01:00
|
|
|
respawn
|
|
|
|
script
|
2009-02-27 14:40:31 +01:00
|
|
|
export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:${pkgs.gzip}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH
|
2007-11-15 18:16:16 +01:00
|
|
|
${nixEnvVars}
|
2009-02-27 14:40:31 +01:00
|
|
|
exec nice -10 ${nix}/bin/nix-worker --daemon > /dev/null 2>&1
|
2007-02-22 19:04:18 +01:00
|
|
|
end script
|
2006-12-09 04:11:14 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
}
|