Your hunch is exactly right. macOS upgrades typically do precisely that and it's quite annoying. I work at Determinate Systems as a full-time macOS user and it's one of those things I kind of quietly tolerated and didn't give much thought, but having this fixed removes a real headache.
Unfortunately, you will need to uninstall Nix[1] and then re-install it using that script. But given how we've built the installer that should be pretty seamless.
Point of clarification: we are fully open to upstreaming the installer in whole or in part and have been from the get-go.[^1] But the installer is a pretty radical departure from the current official installer. The official installer is written in Bash; the DetSys installer is written in Rust. The official installer targets fairly "standard" platforms; the DetSys installer has experimental support for things like the SteamDeck. And so on.
We think it's perfectly okay to have that kind of distribution of labor in OSS, where core/upstream things need to be extremely stable and conservative while the community runs experiments and figures out what works and doesn't.
Niv is fine and good but there's a lot that it will never provide, like the ability to `nix run` packages or `nix flake show` what your project provides with only a URL in hand.
You may find something like node2nix helpful (https://github.com/svanderburg/node2nix). This converts your package.json into a Nix expression that can then be cached. You're right that it does require some setup and a bit of Nix knowledge but could yield significant benefits and take a good chunk out of that 20 minutes.
Another option might be to use pnpm instead of Yarn and cache your pnpm dependencies. pnpm actually works a bit like Nix in that it creates a pnpm-lock.yaml file with content-based hashes for the full package.json dependency tree. This enables it to quickly determine which parts of the dependency tree it needs to build and which are already available.
Yes! The Action isn't directly aware of what Nix itself is doing or which commands are being run; it's only aware of the Nix store. So whether you're using flakes or channels it works the same.
When Nix "realises" a derivation, it realises the entire dependency tree (here, "realises" means either building or fetching, depending on whether a dependency is already in the Nix store). For every single derivation (dependency) in the tree, Nix first calculates what the store path for that dependency would be and then uses that to determine if it's already stored in the Nix store. So it would look at, say, a glibc dependency in a derivation and determine that the Nix store path would be /nix/store/7kn2mkg0g49lfflkdip7i39q3zsck4pc-glibc. If that's already in the Nix store then it doesn't need to build that. And it applies this logic throughout the entire dependency tree. In some cases, the entire dependency tree has already been built and written to the Nix store, in which Nix knows that it doesn't have to build anything. So Nix's caching logic doesn't apply only to the "first steps" of a Nix build (or realisation, to be more specific); it applies to all steps.
I know that Python builders do exist out there. Personally, I've found Nushell much more concise than Python et al and quite adequate for the task at hand. But who knows, maybe I should do a whole series :)
Apologies for my "well, actually" pedantry but Nickel is a type-safe alternative to Nix for creating expressions and, as far as I know, not a builder. _But_, that being said, there's indeed a lot of fun areas to explore here that, with enough work and care, could be pretty transformative.
Quite duly noted! I'd love to provide other formats and will investigate this very soon. I can't guarantee that I'll come up with a solution given how vast and variegated the space is, but it's worth trying.
This is a 100% fair point and I do agree that people can be overzealous with pushing Nix. For many projects, Nix is indeed overkill, and it's worth pointing out that some tools, like pnpm, have taken important cues from Nix. In many cases good enough really _is_ good enough and saying "just install npm using Homebrew or whatever you prefer" is totally fine. But when good enough isn't good enough and teammates and would-be contributors burn an hour installing dependencies just to push a small fix, that's where Nix can really shine. Another sweet spot is larger orgs where knowing that you can run `nix develop` in any repo and get everything you need is a legit superpower.
I turned 40 this part March and for a while I felt the same way. "Oh gosh, I'm losing my neural plasticity at a rapid pace!" Nope! I was just having a mini crisis of self-perception based on an arbitrary number and once I got used to being 40 my mental acuity magically returned to me. I suspect the same will happen to you.
In this case, "Nix" refers to the Nix CLI and the Nix language, and not to closely related projects like NixOS, Nixpkgs, Home Manager, and many others that can be understood as "ecosystem" projects dependent on the Nix CLI/language. It's also worth noting that there's a vast constellation of third-party Nix tools that can also be understood as dependent on the core NixOS/nix project on GitHub.
We're currently working on adding Riff to Nixpkgs, and as soon as that happens you'll be able to use it as a dependency in Bob.
As for Devbox, that's certainly an interesting tool but not really something that can be integrated with Riff due to the language difference (Go vs. Rust), but it is fair to say that the projects have related goals.