Skip to content

feat(workflows): add reusable Nix validate/build templates#13

Merged
JacobPEvans-personal merged 2 commits into
mainfrom
feat/nix-ci-templates
May 31, 2026
Merged

feat(workflows): add reusable Nix validate/build templates#13
JacobPEvans-personal merged 2 commits into
mainfrom
feat/nix-ci-templates

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

@JacobPEvans-personal JacobPEvans-personal commented May 31, 2026

What

Establish dryvist/.github as the org's normalized, FlakeHub-free Nix CI home:

  • .github/workflows/_nix-validate.yml — Linux nix flake check (inputs: runner_label, all_systems)
  • .github/workflows/_nix-build.yml — macOS build (input: build-command)
  • zizmor.yml — add dryvist/*: ref-pin to the trusted-publisher policy so the org can reference its own reusable workflows via @main (per the self-reference convention) without a SHA-pin demand.

The two workflows are byte-identical ports from JacobPEvans-personal/.github (git-blob SHA verified). Both use DeterminateSystems/determinate-nix-action@v3 as a Nix installer only plus actions/cache — neither touches FlakeHub.

Why

FlakeHub's hosted cache no longer has a useful free tier. dryvist/nix-claude-code is the last Nix repo still using magic-nix-cache-action (FlakeHub-backed); its CI fails on api.flakehub.com auth. This makes dryvist/.github the single normalized Nix CI source so the failure cannot silently recur. The failing repo is repointed at _nix-validate.yml@main in dryvist/nix-claude-code#33.

The zizmor.yml change is required because dryvist/.github/...@main is an org self-reference; the policy previously trusted only external vendors (actions/*, DeterminateSystems/*, googleapis/*), so a self-referencing reusable-workflow call failed unpinned-uses. Verified: with dryvist/* trusted, nix flake check on the consumer passes (zizmor...Passed).

Notes

  • Ported byte-identical so the eventual consumer repoint (nix-darwin/nix-ai/nix-home/nix-screenpipe) is a clean uses: owner-swap.
  • actionlint flags SC2086 at _nix-validate.yml:98 ($ALL_SYSTEMS_FLAG unquoted) — intentional in the upstream canonical (the flag is --all-systems or empty; quoting passes an empty arg to nix flake check). Kept verbatim; this repo runs no shellcheck/actionlint gate.

Refs: dryvist/nix-claude-code#33, dryvist/ai-assistant-instructions#662

Relocate the shared Nix CI reusable workflows into dryvist/.github so the
org has one normalized, FlakeHub-free Nix CI source. Ported byte-identical
from JacobPEvans-personal/.github (git-blob SHA match) so the consumer
repoint is a clean uses: owner-swap and the eventual personal-copy removal
needs no drift reconciliation.

Both use determinate-nix-action (installer only) + actions/cache; neither
touches FlakeHub. zizmor policy already permits DeterminateSystems/* ref-pin,
so no policy change is needed.

Assisted-by: Claude:claude-opus-4-8
The org references its own reusable workflows via @main (self-reference
convention), but the unpinned-uses policy only trusted external vendors,
so a dryvist/.github reusable-workflow call failed zizmor with a SHA-pin
demand. Add dryvist/* to the trusted-publisher list so consumers can call
the new Nix templates as dryvist/.github/...@main.

Assisted-by: Claude:claude-opus-4-8
@JacobPEvans-personal JacobPEvans-personal merged commit 71c5255 into main May 31, 2026
1 check passed
JacobPEvans-personal added a commit to dryvist/nix-claude-code that referenced this pull request May 31, 2026
dryvist/.github#13 merged: adds the _nix-validate template and the
dryvist/* entry to the zizmor unpinned-uses trusted-publisher policy.
Bump the pinned input so the local/CI zizmor check (which reads
${inputs.dryvist-github}/zizmor.yml) accepts the dryvist/.github@main
reusable-workflow reference in ci.yml. nix flake check passes (EXIT 0).

Assisted-by: Claude:claude-opus-4-8
JacobPEvans-personal added a commit to dryvist/docs that referenced this pull request May 31, 2026
Add a Continuous integration section to the Nix hub page: CI runs through
shared reusable workflows with actions/cache + cache.nixos.org, and does not
use FlakeHub. FlakeHub's hosted cache no longer has a useful free tier and a
FlakeHub-backed cache action fails CI on api.flakehub.com auth. The free
Determinate installer and Determinate Nix module are unaffected.

Refs: dryvist/.github#13

Assisted-by: Claude:claude-opus-4-8
JacobPEvans-personal added a commit to dryvist/nix-claude-code that referenced this pull request May 31, 2026
* fix(dev-hygiene): exclude CHANGELOG.md from treefmt

release-please regenerates CHANGELOG.md with `*` bullets each release;
prettier (via treefmt) rewrote them to `-` and failed the treefmt and
pre-commit flake checks. Exclude CHANGELOG.md from treefmt, mirroring the
existing markdownlint-cli2 exclude. Collapse the settings.* assignments
into one block to satisfy statix. This failure was masked until now because
CI died at the FlakeHub cache step before nix flake check ran.

Assisted-by: Claude:claude-opus-4-8

* fix(ci): drop FlakeHub cache, call shared nix-validate template

The inline ci.yml used DeterminateSystems/magic-nix-cache-action, which now
authenticates its cache against api.flakehub.com and fails CI:
  FlakeHub: cache initialized failed: Unauthenticated: Cannot find netrc
  credentials for https://api.flakehub.com/
FlakeHub's hosted cache no longer has a useful free tier. Replace the three
inline jobs with a single call to the shared, FlakeHub-free _nix-validate
template (actions/cache + Determinate installer). nix flake check covers
flake eval + treefmt + pre-commit + lib tests; all_systems:false keeps it to
the runner's system, matching prior x86_64-linux-only behavior.

Refs: dryvist/.github#13

Assisted-by: Claude:claude-opus-4-8

* chore(deps): bump dryvist-github for dryvist/* zizmor trust

dryvist/.github#13 merged: adds the _nix-validate template and the
dryvist/* entry to the zizmor unpinned-uses trusted-publisher policy.
Bump the pinned input so the local/CI zizmor check (which reads
${inputs.dryvist-github}/zizmor.yml) accepts the dryvist/.github@main
reusable-workflow reference in ci.yml. nix flake check passes (EXIT 0).

Assisted-by: Claude:claude-opus-4-8

* refactor(flake): inherit dev-hygiene from dryvist/.github flake-module

Stop redefining the org-wide dev-hygiene global settings locally. Delete the
inlined flake/dev-hygiene.nix and import inputs.dryvist-github.flakeModules.dev-hygiene
instead — the same dryvist/.github source already used for zizmor.yml, now a
lean flake (treefmt-nix + git-hooks only, no devenv/crate2nix/devshell).

dryvist-github becomes a flake input (nixpkgs follows ours); the standalone
treefmt-nix and git-hooks inputs are dropped (now transitive via .github).
The CHANGELOG.md treefmt exclude lives in the shared module, not here.

Lock temporarily pins the dryvist/.github#15 branch; repointed to main once it
merges. nix flake check passes (EXIT 0).

Refs: dryvist/.github#15

Assisted-by: Claude:claude-opus-4-8
JacobPEvans-personal added a commit to dryvist/ai-assistant-instructions that referenced this pull request May 31, 2026
The Nix reusable workflows (_nix-validate.yml, _nix-build.yml) now live in
dryvist/.github, not JacobPEvans-personal/.github. Split the canonical-homes
table so a future agent does not 'fix' the cross-owner split or move the
remaining non-Nix shared .github workflows.

Refs: dryvist/.github#13

Assisted-by: Claude:claude-opus-4-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant