about summary refs log tree commit diff
path: root/scripts/nix-profile.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-profile.sh.in')
-rw-r--r--scripts/nix-profile.sh.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
index d343385cc1e5..bc3dc719eb6f 100644
--- a/scripts/nix-profile.sh.in
+++ b/scripts/nix-profile.sh.in
@@ -19,9 +19,9 @@ fi
 
 export PATH="$HOME/.nix-profile/bin:$PATH"
 
-# Subscribe the root user to the NixOS channel by default.
+# Subscribe the root user to the Nixpkgs channel by default.
 if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
-    echo "http://nixos.org/releases/nixos/channels/nixos-unstable nixos" > $HOME/.nix-channels
+    echo "http://nixos.org/releases/nixos/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels
 fi
 
 # Create the per-user garbage collector roots directory.
@@ -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