mv sshopts

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-09-03 15:08:18 +02:00
parent 8113ec70ce
commit a8d8da4e0d
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
3 changed files with 3 additions and 9 deletions

View file

@ -10,10 +10,7 @@ let
inherit pathToRoot pathFromRoot;
nodeName = "ssh";
targetSystem = system;
sshOpts = [
"ConnectTimeout=1"
"ServerAliveInterval=1"
];
sshOpts = [ ];
};
deploy =
(import ../common/data-model.nix {

View file

@ -10,10 +10,7 @@ let
inherit pathToRoot pathFromRoot;
nodeName = "target";
targetSystem = system;
sshOpts = [
"ConnectTimeout=1"
"ServerAliveInterval=1"
];
sshOpts = [ ];
};
deploy =
(import ../common/data-model.nix {

View file

@ -39,7 +39,7 @@ NIX_SSHOPTS="${sshOpts[*]}" nix-copy-closure --to "$destination" "$outPath" --gz
# shellcheck disable=SC2029
ssh "${sshOpts[@]}" "$destination" "nix-env --profile /nix/var/nix/profiles/system --set $outPath"
# shellcheck disable=SC2029
output=$(ssh "${sshOpts[@]}" "$destination" "nohup $outPath/bin/switch-to-configuration switch &" 2>&1) || echo "status code: $?"
output=$(ssh -o "ConnectTimeout=1" -o "ServerAliveInterval=1" "${sshOpts[@]}" "$destination" "nohup $outPath/bin/switch-to-configuration switch &" 2>&1) || echo "status code: $?"
echo "output: $output"
if [[ $output != *"Timeout, server $host not responding"* ]]; then
echo "non-timeout error: $output"