summary refs log tree commit diff
path: root/modules/services/misc/nix-daemon.nix
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2010-02-19 09:48:24 +0000
committerRob Vermaas <rob.vermaas@gmail.com>2010-02-19 09:48:24 +0000
commita87ee76cb390cb721242ea21534150781292b0c9 (patch)
treedccfa196d9e9aac37df6b6acecbb0351e56ab1d8 /modules/services/misc/nix-daemon.nix
parent093b51a56238ca358f67744e6fe9c36a064a09f0 (diff)
downloadnixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar.gz
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar.bz2
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar.lz
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar.xz
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.tar.zst
nixpkgs-a87ee76cb390cb721242ea21534150781292b0c9.zip
* hydra: added option to self manage nix.machines (for buildfarm purposes)
svn path=/nixos/trunk/; revision=20121
Diffstat (limited to 'modules/services/misc/nix-daemon.nix')
-rw-r--r--modules/services/misc/nix-daemon.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix
index 69a7149c2be..b4f8091b163 100644
--- a/modules/services/misc/nix-daemon.nix
+++ b/modules/services/misc/nix-daemon.nix
@@ -66,6 +66,14 @@ in
         ";
       };
 
+      manualNixMachines = mkOption {
+        default = false;
+        description = "
+          Whether to manually manage the list of buildmachines used in distributed 
+          builds in /etc/nix.machines. 
+        ";
+      };
+
       daemonNiceLevel = mkOption {
         default = 10;
         description = "
@@ -182,7 +190,7 @@ in
         }
       ]
 
-      ++ optional config.nix.distributedBuilds
+      ++ optional (config.nix.distributedBuilds && !config.nix.manualNixMachines)
         { # List of machines for distributed Nix builds in the format expected
           # by build-remote.pl.
           source = pkgs.writeText "nix.machines"
@@ -205,6 +213,9 @@ in
           ''
             export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:${pkgs.gzip}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH
             ${config.nix.envVars}
+            # To reduce the load on Hydra, don't start all those
+            # unnecessary substituter processes.
+            export NIX_SUBSTITUTERS=
             exec \
               nice -n ${builtins.toString config.nix.daemonNiceLevel} \
               ${pkgs.utillinux}/bin/ionice -n ${builtins.toString config.nix.daemonIONiceLevel} \