nixos-rebuild: Respect empty NIX_REMOTE

Fixes #11384.

Note: in Nix 1.12, you can set NIX_REMOTE to "local" to avoid
ambiguity.
This commit is contained in:
Eelco Dolstra 2017-07-07 11:57:00 +02:00
parent 6e4a343fa4
commit 707703185d
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -250,7 +250,7 @@ trap cleanup EXIT
# If --repair is given, don't try to use the Nix daemon, because the
# flag can only be used directly.
if [ -z "$repair" ] && systemctl show nix-daemon.socket nix-daemon.service | grep -q ActiveState=active; then
export NIX_REMOTE=${NIX_REMOTE:-daemon}
export NIX_REMOTE=${NIX_REMOTE-daemon}
fi