Skip to content

chore: refactor repo structure for clarity (#15) #13

chore: refactor repo structure for clarity (#15)

chore: refactor repo structure for clarity (#15) #13

Workflow file for this run

# Eval Nix — fast validation that the flake still evaluates and the ISO
# derivations instantiate.
#
# Unlike Build ISO / Build and release ISO (which realise the full multi-GB
# images and only run for ready PRs / tags), this is cheap and runs on EVERY
# commit and pull request. Two checks, neither builds anything:
# 1. `nix flake check --no-build --all-systems` — evaluates every flake
# output (nixosConfigurations, packages, …) for all declared systems.
# 2. The Makefile's `*/drv` targets instantiate the installer + appliance ISO
# derivations (evaluate .drvPath, write the .drv, no realisation).
# A typo, bad reference, or type error in the Nix surfaces here in seconds
# instead of after a long image build.
#
# Both architectures are instantiated on a single x86_64 runner: evaluating an
# aarch64-linux derivation needs no aarch64 builder (only realisation would).
# The eval runs inside the nixos/nix container via `docker run` for the same
# reason as the other workflows — that image lacks a glibc loader for GitHub's
# bundled Node, so JS actions (checkout) stay on the host runner.
name: Eval Nix
on:
push:
branches: [main]
pull_request:
# Re-eval on every PR commit too (synchronize), plus open/reopen. This is
# the cheap per-commit gate, so unlike Build ISO we DO want synchronize.
types: [opened, reopened, synchronize]
workflow_dispatch:
concurrency:
group: eval-${{ github.ref }}
cancel-in-progress: true
jobs:
eval:
name: instantiate ISO derivations
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Eval flake + instantiate ISO derivations (in nixos/nix container)
run: |
docker run --rm \
-v "$PWD":/work -w /work \
nixos/nix:latest \
sh -euc '
export NIX_CONFIG="experimental-features = nix-command flakes"
git config --global --add safe.directory /work
# 1) Evaluate every flake output (nixosConfigurations, packages,
# etc.) without realising anything: --no-build skips building
# derivations, --all-systems checks outputs for every system
# the flake declares (x86_64 + aarch64). Catches eval errors in
# flake outputs not covered by the ISO drv targets below.
nix flake check --impure --no-build --all-systems
# 2) Instantiate the ISO derivations via the `*/drv` make targets
# (evaluate .drvPath, no build). Both arches per image; aarch64
# eval needs no aarch64 builder.
nix-shell -p gnumake git --run "
make installer/drv/x86_64-linux installer/drv/aarch64-linux \
appliance/drv/x86_64-linux appliance/drv/aarch64-linux
"
'