From 89b2aa99fbef95221df9e91e782f0006a231b517 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 24 Jul 2017 00:05:31 +0200 Subject: shell: set NIX_REMOTE only if daemon-socket exists --- shell.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index fce8eaa..fda48a1 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 } - 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 -- cgit v1.2.3