From d7653dfc6dea076ecbe00520c6137977e0fced35 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 1 May 2017 15:46:47 +0200 Subject: Remove $NIX_BUILD_HOOK and $NIX_CURRENT_LOAD This is to simplify remote build configuration. These environment variables predate nix.conf. The build hook now has a sensible default (namely build-remote). The current load is kept in the Nix state directory now. --- src/build-remote/build-remote.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/build-remote/build-remote.cc') diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 1ee8a625b6bc..c41383bcf27d 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -140,7 +140,9 @@ int main (int argc, char * * argv) settings.buildTimeout = std::stoll(argv[3]); verbosity = (Verbosity) std::stoll(argv[4]); - currentLoad = getEnv("NIX_CURRENT_LOAD", "/run/nix/current-load"); + /* It would be more appropriate to use $XDG_RUNTIME_DIR, since + that gets cleared on reboot, but it wouldn't work on OS X. */ + currentLoad = settings.nixStateDir + "/current-load"; std::shared_ptr sshStore; AutoCloseFD bestSlotLock; -- cgit 1.4.1