nixos/scripts/test-config.sh
2022-05-11 11:26:01 +02:00

15 lines
325 B
Bash

for host in $(all-hosts); do
printf -- "-> Checking %s.. " "$host"
if nixos-rebuild --flake ".#$host" dry-build 2> /tmp/build-output; then
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"