about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-10-08 11:43:05 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-10-08 11:43:05 +0200
commit316d4faba4a3b381e4483a274bbf07b69288257e (patch)
treef43a8c642295f56092afa7f456069ffe2ef97395 /nixos/modules/installer
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
downloadnixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar.gz
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar.bz2
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar.lz
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar.xz
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.tar.zst
nixlib-316d4faba4a3b381e4483a274bbf07b69288257e.zip
nixos-rebuild: Fix target-host using fish
I have `users.defaultUserShell = pkgs.fish;` set on my server and when I ran `nixos-rebuild switch --target-host …`, the command failed with the following error:

    fish: Unsupported use of '='. To run 'nix-store' with a modified environment, please use 'env PATH=… nix-store…'

That is because fish requires env to set environment variables for a program. It should also work on other shells.
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-rebuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index 6a08c9b4c6c6..ea434ca87416 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -111,7 +111,7 @@ buildHostCmd() {
     if [ -z "$buildHost" ]; then
         "$@"
     elif [ -n "$remoteNix" ]; then
-        ssh $SSHOPTS "$buildHost" PATH="$remoteNix:$PATH" "$@"
+        ssh $SSHOPTS "$buildHost" env PATH="$remoteNix:$PATH" "$@"
     else
         ssh $SSHOPTS "$buildHost" "$@"
     fi