TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows

195 pointsby biggestloualmost 2 years ago

10 comments

grhmcalmost 2 years ago
Graham Christensen here, cofounder of DetSys. Happy to answer any questions! The Magic Nix Cache has been a huge boon to us internally, and we're really excited to share it with the world today.
评论 #36487915 未加载
评论 #36486735 未加载
评论 #36490896 未加载
grhmcalmost 2 years ago
One project cut their CI time from 18m to 3m: <a href="https:&#x2F;&#x2F;github.com&#x2F;awkward-squad&#x2F;hasql-interpolate&#x2F;actions">https:&#x2F;&#x2F;github.com&#x2F;awkward-squad&#x2F;hasql-interpolate&#x2F;actions</a>. I wonder who will see the biggest cut!<p>Note that when PRs merge to the default branch, their cache doesn&#x27;t come with them. This is how GitHub Action&#x27;s cache works, as a security measure. However: subsequent rebuilds will, and PRs off the default branch will too.
miduilalmost 2 years ago
Nice, really hope I&#x27;ll find some sweet way to cache similarish with GitLab-CI. Also kinda been thinking about how cool it&#x27;d be to run Kubernetes with Nix natively (so instead of a docker layer registry you have nix paths mounted together to overlayfs)
评论 #36486172 未加载
评论 #36495174 未加载
评论 #36487985 未加载
评论 #36486586 未加载
SirensOfTitanalmost 2 years ago
Slightly off-topic, but how do folks around here create production packages in nix? I use nix for my dev shells and machine configuration, but haven&#x27;t yet built production packages using it.<p>More concretely, let&#x27;s say you have a python backend that uses poetry. Do you just use `poetry install` in your derivation for python-deps? Do you use something like poetry2nix or node2nix and do all of your package management in nix?
评论 #36487642 未加载
评论 #36487913 未加载
Karupanalmost 2 years ago
As a complete nix noob, will this help with caching node dependencies? We have a few projects that take over 20mins for a `yarn install &amp;&amp; yarn build`. I’ve read setting up Nix for node isn’t that straightforward, but that was a couple of years back. Has anything changed with respect to node projects?
评论 #36487212 未加载
评论 #36489031 未加载
评论 #36487361 未加载
评论 #36487474 未加载
wereHamsteralmost 2 years ago
Just this past week I thought about setting up custom github runners on NixOS machines so that Nix is pre-installed (doesn&#x27;t need to be installed via a github action) and so that the Nix store can be shared between runs. Though I don&#x27;t really want to manage the machines, so I might give this new github action a try…
评论 #36489745 未加载
dlahodaalmost 2 years ago
i replaced cloud autoscaled docker runners with fixed set of machines with nix store cache pee machine. 10x imrovement.
评论 #36487055 未加载
评论 #36487325 未加载
iso8859-1almost 2 years ago
How does the Magic Nix Cache know which parts of my build are deterministic and which aren&#x27;t?<p>I suppose maybe it will only work if I split my build up into multiple steps such that Nix will know to skip those first steps. If Nix knows that, I suppose the Magic Nix Cache also knows?
评论 #36488093 未加载
评论 #36486275 未加载
评论 #36488977 未加载
评论 #36486269 未加载
bketelsenalmost 2 years ago
this looks awesome, can&#x27;t wait to try it out.
sgammonalmost 2 years ago
this is awesome. i&#x27;ve yet to try Nix, but we are starting a remote cache service and we&#x27;d love to be compatible with Nix&#x27; caching mechanism<p>we&#x27;re at <a href="https:&#x2F;&#x2F;less.build" rel="nofollow noreferrer">https:&#x2F;&#x2F;less.build</a> if you want to take a peek -- we will look at adding S3 support! :)
评论 #36488462 未加载
评论 #36487899 未加载