Skip to content

feat(flake): declare the clhodapp cache and its upstreams in nixConfig - #12

Merged
clhodapp merged 1 commit into
mainfrom
feature/flake-nixconfig-caches
Sep 7, 2026
Merged

clhodapp merged 1 commit into
mainfrom
feature/flake-nixconfig-caches

Conversation

@clhodapp

@clhodapp clhodapp commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Adds a nixConfig block to flake.nix naming the clhodapp cachix cache and its two upstreams (nix-community, numtide) under extra-substituters / extra-trusted-public-keys, and rewords the README's binary-cache section to match.

What it changes: a direct nix build or nix flake check in a checkout of this repo substitutes from the cache once the settings are accepted (answer Nix's prompt, or pass --accept-flake-config; a non-interactive run otherwise ignores them with a warning). Until now a cold clone had to copy the README table into its own nix.conf.

What it does not change: consumers that take this flake as an input. Nix does not carry an input's nixConfig into the consumer, so the fleet modules and the CI cachix-action wiring stay as they are. The extra- forms add to the user's substituters rather than replacing cache.nixos.org.

Verified: nix fmt leaves the tree unchanged; in merman, nix build --dry-run '.#merman' warns "ignoring untrusted flake configuration setting" without the flag and applies the settings silently with --accept-flake-config.

🤖 Generated with Claude Code

A direct `nix build` or `nix flake check` in a checkout of this repo
now substitutes from the clhodapp cachix cache and its two upstreams
(nix-community, numtide) once the settings are accepted, by answering
Nix's prompt or passing `--accept-flake-config`. Before this, a cold
clone had to copy the README's table into its own nix.conf first.

Consumers that take this flake as an input are unaffected: Nix does not
carry an input's nixConfig into the consumer, which is why the fleet
and CI declare the caches themselves. The `extra-` forms are used so
the block adds to, rather than replaces, the user's own substituters.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@clhodapp clhodapp self-assigned this Sep 7, 2026
@clhodapp
clhodapp merged commit 6ad0999 into main Sep 7, 2026
2 checks passed
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