Skip to content

Commit

Permalink
nix-daemon: Remove a bunch of unnecessary environment variables
Browse files Browse the repository at this point in the history
(cherry picked from commit 3971876)
  • Loading branch information
edolstra authored and globin committed Mar 6, 2017
1 parent 630e380 commit 17f6e7b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nixos/modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
Expand Down Expand Up @@ -381,7 +383,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
Expand All @@ -391,12 +395,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.
Expand Down

0 comments on commit 17f6e7b

Please sign in to comment.