nixos-rebuild: Respect empty NIX_REMOTE

Fixes #11384.

Note: in Nix 1.12, you can set NIX_REMOTE to "local" to avoid
ambiguity.

Changed files
+1 -1
nixos
modules
installer
+1 -1
nixos/modules/installer/tools/nixos-rebuild.sh
···
# 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