shell: set NIX_REMOTE only if daemon-socket exists

This commit is contained in:
tv 2017-07-24 00:05:31 +02:00
parent 05eb415bea
commit a1cdec85d6

View File

@ -236,7 +236,9 @@ in pkgs.stdenv.mkDerivation {
shellHook = /* sh */ ''
export OLD_PATH="$PATH"
export NIX_PATH=stockholm=$PWD:nixpkgs=${toString <nixpkgs>}
if test -e /nix/var/nix/daemon-socket/socket; then
export NIX_REMOTE=daemon
fi
export PATH=${lib.makeBinPath [
pkgs.populate
shell.cmdspkg