Fix shellcheck warnings in build-flakes
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled

This commit is contained in:
Torjus Håkestad 2025-05-28 21:05:28 +02:00
parent dd255955ca
commit 3588fa670e
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4

View File

@ -7,8 +7,7 @@ git pull
echo "Starting nixos-servers builds"
for host in $(nix flake show --json| jq -r '.nixosConfigurations | keys[]'); do
echo "Building $host"
nixos-rebuild --verbose -L --flake ".#$host" build
if [ $? -ne 0 ]; then
if ! nixos-rebuild --verbose -L --flake ".#$host" build; then
echo "Build failed for $host"
cat <<EOF | curl --data-binary @- "https://pushgw.home.2rjus.net/metrics/job/$JOB_NAME"
# TYPE build_flakes_error gauge
@ -30,8 +29,7 @@ echo "Building gunter"
cd /root/nixos
git pull
host="gunter"
nixos-rebuild --verbose -L --flake ".#gunter" build
if [ $? -ne 0 ]; then
if ! nixos-rebuild --verbose -L --flake ".#gunter" build; then
echo "Build failed for $host"
cat <<EOF | curl --data-binary @- "https://pushgw.home.2rjus.net/metrics/job/$JOB_NAME"
# TYPE build_flakes_error gauge