fix(ci): replace --no-build with disk cleanup for nix-validate#299
Merged
Conversation
PR #298 added `--no-build` to keep the linux runner from exhausting disk on darwin source substitution. That worked for nix-home (whose module-eval was made lazy in a follow-up PR), but broke nix-darwin and nix-ai checks that reference derivation outputs across platforms — `--no-build` disables the substitution context realisation those checks rely on, producing: error: path '<hash>-inputs' is not valid error: path '<hash>-wrap-claude-command-...drv' is not valid Switch strategy: keep `--all-systems` (so darwin-only broken packages are still caught at evaluation) but drop `--no-build` and free ~30GB on the runner via jlumbroso/free-disk-space (Android SDK, .NET, Haskell, Docker images). Tool-cache (Node/Python/Go) and large-packages stay intact for other workflow steps. Universally compatible with existing consumer checks. No per-repo changes needed. Assisted-by: Claude <noreply@anthropic.com>
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the reusable Nix validation workflow to restore full nix flake check --all-systems behavior (including substitution/realisation needed by downstream checks) while mitigating GitHub-hosted runner disk exhaustion by freeing space prior to installing Nix.
Changes:
- Adds a “Free disk space” step (via
jlumbroso/free-disk-space) before Nix installation to reclaim ~30GB onubuntu-latest. - Removes
--no-buildfrom thenix flake check --all-systemsinvocation and updates the surrounding rationale comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 11, 2026
fix(checks): make module-eval compatible with nix flake check --no-build
JacobPEvans/nix-darwin#1092
Closed
Address Copilot review feedback on #299: - Pin jlumbroso/free-disk-space to v1.3.1 (SHA 54081f138730…) instead of @main. The action is outside renovate-presets.json trusted orgs, so SHA pinning is required. - Gate the step with `if: startsWith(inputs.runner_label, 'ubuntu-')` so self-hosted runners (RunsOn, etc.) are never touched. Removing preinstalled components on a long-lived self-hosted runner would damage shared state. Assisted-by: Claude <noreply@anthropic.com>
3 tasks
JacobPEvans
added a commit
that referenced
this pull request
May 11, 2026
`nix flake check --all-systems` attempts to BUILD outputs for every declared
system, not just evaluate. For repos whose checks are pkgs.runCommand
derivations (nix-darwin: module-eval; nix-ai: wrap-claude-command, gemini-
policy, fabric-patterns-marketplace, maestro-cli, pal-mcp-server, plus the
check-* derivations) building cross-platform on the linux runner fails with:
error: Cannot build '<hash>-X.drv'.
Reason: platform mismatch
Required system: 'aarch64-darwin'
Current system: 'x86_64-linux'
Disk cleanup (introduced in #299) doesn't address this — platform mismatch
is a build-time issue, not a space issue. --no-build (introduced in #298)
broke substitution context for input flakes, producing "path is not valid"
errors elsewhere.
Solution: add an `all_systems` boolean input (default true) so consumers
opt-out per-repo. nix-home keeps the default (its module-eval was made
platform-aware so it works with --all-systems). nix-darwin and nix-ai
should set `all_systems: false` in their ci-gate workflow caller.
The free-disk-space step is now gated on `all_systems && ubuntu-*` since
disk pressure only happens when substituting cross-platform closures.
Assisted-by: Claude <noreply@anthropic.com>
This was referenced May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
#298 added `--no-build` to keep the ubuntu-latest runner from exhausting disk on darwin source substitution. That worked for nix-home (its module-eval was made lazy in JacobPEvans/nix-home#234), but broke nix-darwin and nix-ai checks that reference derivation outputs across platforms:
```
error: path '-inputs' is not valid
error: path '-wrap-claude-command-…drv' is not valid
```
`--no-build` disables substitution context realisation, which those checks legitimately need.
Switch strategy:
Universally compatible with existing consumer checks — no per-repo changes needed.
Test plan
Assisted-by: Claude noreply@anthropic.com