diff options
author | Marc Weber <marco-oweber@gmx.de> | 2009-07-18 16:14:03 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2009-07-18 16:14:03 +0000 |
commit | dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93 (patch) | |
tree | a11ce55d70baf438992654f0fd40d22c9728139a /modules/services/misc/nix-daemon.nix | |
parent | d59155960977939fc748e2930685e635255c9ee9 (diff) | |
download | nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar.gz nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar.bz2 nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar.lz nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar.xz nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.tar.zst nixpkgs-dbd6ea7f63ef0d1eb68c142d2da9cda57ac33c93.zip |
adding daemonNiceLevel option. running biulds with niceness 0 can be annoying
svn path=/nixos/branches/modular-nixos/; revision=16420
Diffstat (limited to 'modules/services/misc/nix-daemon.nix')
-rw-r--r-- | modules/services/misc/nix-daemon.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index b8911a8cea3..f3c749ff480 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -63,6 +63,15 @@ let "; }; + + daemonNiceLevel = mkOption { + default = 2; + description = " + nix dameon process priority. This priority propagates to build processes. + 0 is default unix process priority. 20 is lowest. + "; + }; + buildMachines = mkOption { example = [ { hostName = "voila.labs.cs.uu.nl"; @@ -245,7 +254,7 @@ in '' export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH ${config.nix.envVars} - exec ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 + exec nice -n ${builtins.toString config.nix.daemonNiceLevel} ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 ''; }; |