From a87ee76cb390cb721242ea21534150781292b0c9 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 19 Feb 2010 09:48:24 +0000 Subject: [PATCH] * hydra: added option to self manage nix.machines (for buildfarm purposes) svn path=/nixos/trunk/; revision=20121 --- modules/services/misc/nix-daemon.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 69a7149c2bed..b4f8091b163f 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} \