nixos-servers/rebuild-all.sh
Torjus Håkestad 822c22cde6
Some checks failed
Run nix flake check / flake-check (push) Failing after 4m54s
Periodic flake update / flake-update (push) Successful in 1m23s
Add script to rebuild all hosts
2025-01-21 00:05:40 +01:00

19 lines
287 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# array of hosts
HOSTS=(
"ns1"
"ns2"
"ca"
"ha1"
"http-proxy"
"jelly01"
"monitoring01"
)
for host in "${HOSTS[@]}"; do
echo "Rebuilding $host"
nixos-rebuild boot --flake .#${host} --target-host root@${host}
done