about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-25T21·06-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-25T21·06-0400
commit2605f4f4e6a367df67bf8b33b252c350313699c9 (patch)
tree87a9368202cb763c130e95ca89b0a97e9c24cb04 /scripts
parent477b0fbeca62bf1957bc0aad26f1a844ebd22231 (diff)
nix-profile.sh: Don't set NIX_REMOTE on single user installations
Commit 6a214f3e06fa1c5f0a4d40e555f14d87691af297 reused the NixOS
environment initialisation for nix-profile.sh, but this is
inappropriate on systems that don't have multi-user support enabled.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-profile.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
index b18069d9408b..bc3dc719eb6f 100644
--- a/scripts/nix-profile.sh.in
+++ b/scripts/nix-profile.sh.in
@@ -43,7 +43,7 @@ fi
 
 # Set up secure multi-user builds: non-root users build through the
 # Nix daemon.
-if test "$USER" != root; then
+if [ "$USER" != root -a -e @localstatedir@/nix/daemon-socket/socket ]; then
     export NIX_REMOTE=daemon
 else
     unset NIX_REMOTE