Merge pull request 'ci: evaluate hosts discovered from the flake, not a hard-coded list' (#19) from fix/ci-dynamic-host-eval into main
CI / flake (push) Successful in 2m4s
CI / flake (push) Successful in 2m4s
Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
@@ -34,10 +34,16 @@ jobs:
|
|||||||
# Evaluate (not build) each host's toplevel so eval errors fail CI cheaply.
|
# 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
|
# aarch64 / darwin hosts evaluate fine on an x86_64 runner; only building
|
||||||
# would need emulation, which we deliberately avoid here.
|
# 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
|
- name: Evaluate NixOS host configurations
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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"
|
echo "::group::eval $host"
|
||||||
nix eval --raw ".#nixosConfigurations.$host.config.system.build.toplevel.drvPath"
|
nix eval --raw ".#nixosConfigurations.$host.config.system.build.toplevel.drvPath"
|
||||||
echo
|
echo
|
||||||
@@ -47,7 +53,9 @@ jobs:
|
|||||||
- name: Evaluate Darwin host configurations
|
- name: Evaluate Darwin host configurations
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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"
|
echo "::group::eval $host"
|
||||||
nix eval --raw ".#darwinConfigurations.$host.config.system.build.toplevel.drvPath"
|
nix eval --raw ".#darwinConfigurations.$host.config.system.build.toplevel.drvPath"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user