nixos-rebuild: fix entering sudo password over SSH

We always want to use `ssh -t` to force PTY allocation as there may be
interactive SSH prompts like trusting unknown hosts.
This commit is contained in:
Michael Hoang 2023-12-30 13:32:28 +11:00
parent 5aad97fcff
commit 09fd207cb8

View File

@ -436,7 +436,7 @@ if [ "$action" = edit ]; then
exit 1
fi
SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60"
SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60 -t"
# First build Nix, since NixOS may require a newer version than the
# current one.