From b11e99d850584c28bc9dfc7d8561d11109e21c5c Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Wed, 10 Jun 2026 10:43:12 +0100 Subject: [PATCH] ci: evaluate hosts discovered from the flake, not a hard-coded list The eval steps listed hosts by hand and still referenced lyrathorpe-x1c, which was removed (replaced by t400/macpro31), so CI errored. Derive the NixOS and Darwin host lists from attrNames of nixos/darwinConfigurations instead, so adding or removing a host needs no workflow change. Verified locally under bash: all current hosts (edaas, macpro31, mbp, t400, mac) evaluate; no removed host is referenced. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ci.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e53b333..e2efec1 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -34,10 +34,16 @@ jobs: # Evaluate (not build) each host's toplevel so eval errors fail CI cheaply. # aarch64 / darwin hosts evaluate fine on an x86_64 runner; only building # would need emulation, which we deliberately avoid here. + # + # Host lists are discovered from the flake (attrNames of + # nixos/darwinConfigurations) rather than hard-coded, so adding or removing + # a host needs no change to this workflow. - name: Evaluate NixOS host configurations run: | set -euo pipefail - for host in lyrathorpe-mbp lyrathorpe-x1c emmathorpe-edaas; do + hosts=$(nix eval --raw '.#nixosConfigurations' \ + --apply 'cfgs: builtins.concatStringsSep "\n" (builtins.attrNames cfgs)') + for host in $hosts; do echo "::group::eval $host" nix eval --raw ".#nixosConfigurations.$host.config.system.build.toplevel.drvPath" echo @@ -47,7 +53,9 @@ jobs: - name: Evaluate Darwin host configurations run: | set -euo pipefail - for host in lyrathorpe-mac; do + hosts=$(nix eval --raw '.#darwinConfigurations' \ + --apply 'cfgs: builtins.concatStringsSep "\n" (builtins.attrNames cfgs)') + for host in $hosts; do echo "::group::eval $host" nix eval --raw ".#darwinConfigurations.$host.config.system.build.toplevel.drvPath" echo