2023-04-19 01:01:07 +02:00
|
|
|
#!/bin/bash
|
2022-04-18 18:12:06 +02:00
|
|
|
|
|
|
|
for host in $(all-hosts); do
|
|
|
|
printf -- "-> Checking %s.. " "$host"
|
2022-05-11 11:26:01 +02:00
|
|
|
|
2023-04-19 01:01:07 +02:00
|
|
|
if nixos-rebuild --show-trace --flake ".#$host" dry-build 2>/tmp/build-output; then
|
2022-04-18 18:12:06 +02:00
|
|
|
printf "ok\n"
|
|
|
|
else
|
|
|
|
printf "failed!\n"
|
|
|
|
bat --file-name "Failed to verify config for $host" /tmp/build-output
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
printf -- "--> All checks passed\n"
|