#!/bin/bash for host in $(all-hosts); do printf -- "-> Checking %s.. " "$host" if nixos-rebuild --show-trace --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"