ci(mac): fix nix cache config#24
Merged
Merged
Conversation
The original cache setup had three problems: v6 of cache-nix-action is outdated; the key hashed only init.sh, missing flake.lock which is what actually pins the nix-darwin package set; ~/.cache/nix (flake input tarballs) was not cached so nixpkgs was re-fetched every run; and the 1 GiB store cap was too small for a full nix-darwin activation, causing evictions. Raise the cap to 5 GiB and drop the now-redundant profile source since mac-nix-setup writes nix to GITHUB_PATH. Co-Authored-By: Claude <noreply@anthropic.com>
Without writing to GITHUB_PATH, nix is absent from PATH in subsequent steps and post-run hooks. cache-nix-action's post-job step failed with exit 127 when calling nix --version, silently skipping the cache save. nix profile add also installs just into ~/.nix-profile/bin which was equally invisible, causing a command not found at the end of init.sh. Co-Authored-By: Claude <noreply@anthropic.com>
Typas
added a commit
that referenced
this pull request
Apr 30, 2026
cache-nix-action did not speed up mac CI runs in practice. Reverts: - "ci(mac): fix nix cache config (#24)" (25abdbf) - "ci(mac): cache nix store between runs" (8513617) Restores sourcing nix-daemon.sh before init.sh and removes the GITHUB_PATH additions that were only needed for the cache post-step. Co-Authored-By: Claude <noreply@anthropic.com>
Typas
added a commit
that referenced
this pull request
Apr 30, 2026
* ci(mac): fix nix cache config The original cache setup had three problems: v6 of cache-nix-action is outdated; the key hashed only init.sh, missing flake.lock which is what actually pins the nix-darwin package set; ~/.cache/nix (flake input tarballs) was not cached so nixpkgs was re-fetched every run; and the 1 GiB store cap was too small for a full nix-darwin activation, causing evictions. Raise the cap to 5 GiB and drop the now-redundant profile source since mac-nix-setup writes nix to GITHUB_PATH. Co-Authored-By: Claude <noreply@anthropic.com> * fix(mac-nix-setup): add nix bins to GITHUB_PATH Without writing to GITHUB_PATH, nix is absent from PATH in subsequent steps and post-run hooks. cache-nix-action's post-job step failed with exit 127 when calling nix --version, silently skipping the cache save. nix profile add also installs just into ~/.nix-profile/bin which was equally invisible, causing a command not found at the end of init.sh. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
Typas
added a commit
that referenced
this pull request
Apr 30, 2026
cache-nix-action did not speed up mac CI runs in practice. Reverts: - "ci(mac): fix nix cache config (#24)" (25abdbf) - "ci(mac): cache nix store between runs" (8513617) Restores sourcing nix-daemon.sh before init.sh and removes the GITHUB_PATH additions that were only needed for the cache post-step. Co-Authored-By: Claude <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.
The original cache setup had three problems: v6 of cache-nix-action is outdated; the key hashed only init.sh, missing flake.lock which is what actually pins the nix-darwin package set; ~/.cache/nix (flake input tarballs) was not cached so nixpkgs was re-fetched every run; and the 1 GiB store cap was too small for a full nix-darwin activation, causing evictions. Raise the cap to 5 GiB and drop the now-redundant profile source since mac-nix-setup writes nix to GITHUB_PATH.