Skip to content

Commit

Permalink
Pass ssh_args to nix copy and nix build SSH invocations
Browse files Browse the repository at this point in the history
This is necessary for --post-kexec-ssh-port to be useful in situations involving port forwarding, such as when running on qemu
  • Loading branch information
bluepython508 committed Jul 31, 2023
1 parent 7d3a854 commit f878eec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ ssh_() {
}

nix_copy() {
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere" nix copy \
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere ${ssh_args[*]}" nix copy \
"${nix_options[@]}" \
"${nix_copy_options[@]}" \
"$@"
}
nix_build() {
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere" nix build \
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere ${ssh_args[*]}" nix build \
--print-out-paths \
--no-link \
"${nix_options[@]}" \
Expand Down

0 comments on commit f878eec

Please sign in to comment.