Skip to content

Commit

Permalink
Add in post_kexec_ssh_port
Browse files Browse the repository at this point in the history
  • Loading branch information
nealfennimore authored and Mic92 committed Jul 12, 2023
1 parent fbdf18b commit e96436f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Options:
do not reboot after installation, allowing further customization of the target installation.
* --kexec <url>
use another kexec tarball to bootstrap NixOS
* --post-kexec-ssh-port <ssh_port>
after kexec is executed, use a custom ssh port to connect. Defaults to 22
* --stop-after-disko
exit after disko formating, you can then proceed to install manually or some other way
* --extra-files <file...>
Expand Down Expand Up @@ -63,6 +65,7 @@ nix_options=(
)
substitute_on_destination=y
ssh_private_key_file=
post_kexec_ssh_port=22

declare -A disk_encryption_keys
declare -a nix_copy_options
Expand Down Expand Up @@ -104,6 +107,10 @@ while [[ $# -gt 0 ]]; do
kexec_url=$2
shift
;;
--post-kexec-ssh-port)
post_kexec_ssh_port=$2
shift
;;
--debug)
enable_debug="-x"
print_build_logs=y
Expand Down Expand Up @@ -337,7 +344,7 @@ SSH
# use the default SSH port to connect at this point
for i in "${!ssh_args[@]}"; do
if [[ ${ssh_args[i]} == "-p" ]]; then
ssh_args[i + 1]=22
ssh_args[i + 1]=$post_kexec_ssh_port
break
fi
done
Expand Down

0 comments on commit e96436f

Please sign in to comment.