nixos-servers/rebuild-all.sh

21 lines
317 B
Bash
Executable File

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