mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 20:00:36 +03:00
nixos-remote: check if ssh-host is set
This commit is contained in:
parent
70de0d8478
commit
1ddff83733
@ -70,6 +70,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
# ssh wrapper
|
||||
timeout_ssh_() {
|
||||
timeout 10 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_connection" "$@"
|
||||
@ -89,6 +90,10 @@ nix_build() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
if [ -z ${ssh_connection+x} ]; then
|
||||
abort "ssh-host must be set"
|
||||
fi
|
||||
|
||||
# parse flake nixos-install style syntax, get the system attr
|
||||
if [[ ! -z "${flake+x}" ]]; then
|
||||
if [[ $flake =~ ^(.*)\#([^\#\"]*)$ ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user