summaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-07-24 00:05:31 +0200
committertv <tv@krebsco.de>2017-07-25 12:36:00 +0200
commita1cdec85d6fd4c296d98673473623a1c847a1ec2 (patch)
tree4923f51fdeef23c9be321c1f249601a2895a9924 /shell.nix
parent05eb415beac2c27530d71d9db56b6af199e2fbb0 (diff)
shell: set NIX_REMOTE only if daemon-socket exists
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell.nix b/shell.nix
index fce8eaa7..fda48a1a 100644
--- a/shell.nix
+++ b/shell.nix
@@ -236,7 +236,9 @@ in pkgs.stdenv.mkDerivation {
shellHook = /* sh */ ''
export OLD_PATH="$PATH"
export NIX_PATH=stockholm=$PWD:nixpkgs=${toString <nixpkgs>}
- export NIX_REMOTE=daemon
+ if test -e /nix/var/nix/daemon-socket/socket; then
+ export NIX_REMOTE=daemon
+ fi
export PATH=${lib.makeBinPath [
pkgs.populate
shell.cmdspkg