feat(flake): declare the clhodapp cache and its upstreams in nixConfig - #12
Merged
Merged
Conversation
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>
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.
Adds a
nixConfigblock toflake.nixnaming theclhodappcachix cache and its two upstreams (nix-community, numtide) underextra-substituters/extra-trusted-public-keys, and rewords the README's binary-cache section to match.What it changes: a direct
nix buildornix flake checkin 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 ownnix.conf.What it does not change: consumers that take this flake as an input. Nix does not carry an input's
nixConfiginto the consumer, so the fleet modules and the CIcachix-actionwiring stay as they are. Theextra-forms add to the user's substituters rather than replacingcache.nixos.org.Verified:
nix fmtleaves 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