summary refs log tree commit diff
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-03-03 15:55:27 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-03-03 16:50:37 +0100
commit3971876585eb0829a8fc2732c547743544fa706f (patch)
tree62a7d0ee2b7dcc7c357fc5ada3878feeaf455d5e /nixos/modules/services/misc
parent3070c887987e9c24a72a5b7b18db29ebe1ed6d4c (diff)
downloadnixlib-3971876585eb0829a8fc2732c547743544fa706f.tar
nixlib-3971876585eb0829a8fc2732c547743544fa706f.tar.gz
nixlib-3971876585eb0829a8fc2732c547743544fa706f.tar.bz2
nixlib-3971876585eb0829a8fc2732c547743544fa706f.tar.lz
nixlib-3971876585eb0829a8fc2732c547743544fa706f.tar.xz
nixlib-3971876585eb0829a8fc2732c547743544fa706f.tar.zst
nixlib-3971876585eb0829a8fc2732c547743544fa706f.zip
nix-daemon: Remove a bunch of unnecessary environment variables
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 66ee20b5ac94..3027dd1c3d0e 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -8,6 +8,8 @@ let
 
   nix = cfg.package.out;
 
+  isNix112 = versionAtLeast (getVersion nix) "1.12pre4997";
+
   makeNixBuildUser = nr:
     { name = "nixbld${toString nr}";
       description = "Nix build user ${toString nr}";
@@ -380,7 +382,9 @@ in
 
     nix.envVars =
       { NIX_CONF_DIR = "/etc/nix";
+      }
 
+      // optionalAttrs (!isNix112) {
         # Enable the copy-from-other-stores substituter, which allows
         # builds to be sped up by copying build results from remote
         # Nix stores.  To do this, mount the remote file system on a
@@ -390,12 +394,10 @@ in
 
       // optionalAttrs cfg.distributedBuilds {
         NIX_BUILD_HOOK =
-          if versionAtLeast (getVersion nix) "1.12pre4997" then
+          if isNix112 then
             "${nix}/libexec/nix/build-remote"
           else
             "${nix}/libexec/nix/build-remote.pl";
-        NIX_REMOTE_SYSTEMS = "/etc/nix/machines";
-        NIX_CURRENT_LOAD = "/run/nix/current-load";
       };
 
     # Set up the environment variables for running Nix.