From f878eecae39c443c8c5c75603206beea15789554 Mon Sep 17 00:00:00 2001 From: bluepython508 Date: Mon, 31 Jul 2023 18:08:56 +0100 Subject: [PATCH] Pass ssh_args to nix copy and nix build SSH invocations This is necessary for --post-kexec-ssh-port to be useful in situations involving port forwarding, such as when running on qemu --- src/nixos-anywhere.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixos-anywhere.sh b/src/nixos-anywhere.sh index f500b404..b96123dd 100755 --- a/src/nixos-anywhere.sh +++ b/src/nixos-anywhere.sh @@ -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[@]}" \