Skip to content

docs: document local Nix setup and the OpenShell binary cache - #4931

Merged
matthewgrossman merged 4 commits into
mainfrom
docs/local-nix-setup/matthewgrossman
Oct 26, 2026
Merged

matthewgrossman merged 4 commits into
mainfrom
docs/local-nix-setup/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Document how to set up Nix locally so nix develop and nix run .#… substitute from openshell.cachix.org instead of building the cross toolchains from source. A fresh Determinate Nix install ignores the cache declared in flake.nix for non-trusted users, so the first run built 88 derivations, including cross GCC 15.3, and ran for over an hour.

Related Issue

None. Author has write access; this is a small contributor-docs fix found while setting up a fresh machine.

Changes

  • CONTRIBUTING.md: new short Nix setup section under Prerequisites. It recommends Determinate Nix (matches CI), links to the NixOS wiki for enabling flakes with other installers, shows the two nix.custom.conf lines that add the OpenShell cache with Determinate Nix (linking Determinate's configuration docs), and links to the openshell Cachix cache page for other installers.
  • TESTING.md and nix/test-guest/README.md link to that section instead of repeating it. The test-guest requirements mark the cache as optional.

Testing

Tested on macOS (Apple Silicon) with Determinate Nix 3.24.1 (Nix 2.35.3):

  • After the cache was added to /etc/nix/nix.custom.conf and the daemon was restarted, nix config show substituters listed https://openshell.cachix.org.
  • nix build --dry-run .#devShells.aarch64-darwin.default against an empty store went from 88 derivations to build without the cache to 1 (nix-shell) with it. The cross GCCs and compiler-rt are now fetched.
  • nix build --dry-run .#devShells.x86_64-linux.default through the daemon went from 49 derivations to build to 1.
  • The "ignoring untrusted flake configuration setting" warnings still appear after the change; they are harmless.
  • mise run markdown:lint passes.

Not verified: the Cachix-page setup path for installers other than Determinate.

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Recommend Determinate Nix and configuring openshell.cachix.org system-wide so nix develop and nix run substitute the cross toolchains instead of building them from source.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

@purp purp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🚢

@matthewgrossman
matthewgrossman added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 5c533d6 Oct 26, 2026
80 of 81 checks passed
@matthewgrossman
matthewgrossman deleted the docs/local-nix-setup/matthewgrossman branch October 26, 2026 21:07
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