Skip to content

modules: add edgeCacheSubstituters options#187

Open
colemickens wants to merge 2 commits into
mainfrom
colemickens/fec
Open

modules: add edgeCacheSubstituters options#187
colemickens wants to merge 2 commits into
mainfrom
colemickens/fec

Conversation

@colemickens
Copy link
Copy Markdown
Member

@colemickens colemickens commented May 29, 2026

Summary by CodeRabbit

  • New Features
    • Added configuration options to specify edge cache substituter URLs for Determinate Nixd in NixOS and nix-darwin environments.

Review Change Stack

lucperkins
lucperkins previously approved these changes May 29, 2026
Copy link
Copy Markdown
Member

@lucperkins lucperkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: de02b2b2-3376-41c7-8b6d-3e65fd9615fd

📥 Commits

Reviewing files that changed from the base of the PR and between efa5aa3 and 614ed7e.

📒 Files selected for processing (2)
  • modules/nix-darwin/default.nix
  • modules/nixos.nix

📝 Walkthrough

Walkthrough

This PR adds edgeCacheSubstituters configuration option to both nix-darwin and NixOS modules. When set, the option specifies a list of substituter URLs that are serialized into the generated determinate/config.json file on each platform.

Changes

Edge cache substituters across platforms

Layer / File(s) Summary
nix-darwin edgeCacheSubstituters support
modules/nix-darwin/default.nix
Adds determinateNix.determinateNixd.edgeCacheSubstituters option as a nullable list of strings, and extends the JSON generation allowlist to conditionally emit the edgeCacheSubstituters attribute to config.json when set.
NixOS edgeCacheSubstituters support
modules/nixos.nix
Adds determinate.edgeCacheSubstituters option as a nullable list of strings, and conditionally generates /etc/determinate/config.json with the edgeCacheSubstituters key when the option is non-null.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A config so neat, with cache URLs bright,
On Darwin and NixOS, spanning both sites,
Substituters declared, in JSON they rest,
Two platforms aligned, both passing the test!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding new edgeCacheSubstituters options to both the nix-darwin and NixOS modules.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch colemickens/fec

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread modules/nixos.nix
# the Determinate Nixd-managed /etc/nix/nix.conf.
environment.etc."nix/nix.conf".target = "nix/nix.custom.conf";

environment.etc."determinate/config.json" = lib.mkIf (cfg.edgeCacheSubstituters != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mental note that we should probably strive for parity between nix-darwin and NixOS here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that just a general note? I did update nix-darwin also (that's what I tested with)

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.

2 participants