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
commit89b2aa99fbef95221df9e91e782f0006a231b517 (patch)
tree2d15262773e89a7d76b466e36ca6aa126e082f65 /shell.nix
parenta5042a6cebc7b367fa9ae0ad1a218c78ca0d13f5 (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 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 <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