Move the reboot step into the main loop

This commit is contained in:
Andreas Zweili 2022-05-20 13:32:40 +02:00
parent 292750ae80
commit 85632d6fad
1 changed files with 1 additions and 7 deletions

View File

@ -30,17 +30,11 @@ do
fqdn="$host.2li.local"
echo $fqdn
nixos-rebuild switch --use-remote-sudo --build-host localhost --target-host $fqdn --flake ".#$host"
echo
echo
done
for host in "${hosts[@]}"
do
fqdn="$host.2li.local"
if [ $host == "nixos-management" ]; then
continue
fi
echo "reboot $fqdn"
ssh -i rsa_key 'sudo reboot'
ssh -i rsa_ey 'sudo reboot'
echo
echo
done