diff options
| author | rnhmjoj <rnhmjoj@inventati.org> | 2021-06-18 02:50:34 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-06-20 09:23:20 +0000 |
| commit | d81e14f4918a19316eb5574ca0ecaf8bb8aba376 (patch) | |
| tree | c0d36ac72459545dff43dd920d1db2bdbbf76618 | |
| parent | Merge pull request #127464 from Ma27/backport-diff-so-fancy (diff) | |
| download | nixpkgs-d81e14f4918a19316eb5574ca0ecaf8bb8aba376.tar.gz | |
nixos-rebuild: fix --use-remote-sudo
Currently fails with:
$ nixos-rebuild test --target-host myhost --use-remote-sudo
building Nix...
sudo: /run/current-system/sw/bin/sudo must be owned by uid 0 and have the setuid bit set
It seems setting an explicit PATH in the ssh command overrides the
remote setuid wrappers.
(cherry picked from commit 35a8d78e44d566d6d2ddba42ae5137f7a511a090)
| -rw-r--r-- | pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 2b94f18f5386..62828de2676b 100644 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -145,7 +145,7 @@ buildHostCmd() { if [ -z "$buildHost" ]; then "$@" elif [ -n "$remoteNix" ]; then - ssh $SSHOPTS "$buildHost" env PATH="$remoteNix":'$PATH' "${maybeSudo[@]}" "$@" + ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" env PATH="$remoteNix":'$PATH' "$@" else ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@" fi |
