nix-daemon: only add channels dir to NIX_PATH if exists

Per reviewer comment (thanks!).
This commit is contained in:
Will Dietz 2018-09-28 14:53:04 -05:00 committed by Graham Christensen
parent f3a114e088
commit 243e28bc96

View File

@ -446,7 +446,9 @@ in
export NIX_REMOTE=daemon
fi
'' + ''
export NIX_PATH="$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}"
if [ -e "$HOME/.nix-defexpr/channels" ]; then
export NIX_PATH="$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}"
fi
'';
nix.nrBuildUsers = mkDefault (lib.max 32 cfg.maxJobs);