// HACKER NEWS — CYBERSECURITY
One Nix flake to rule them all
Flakes are undoubtedly here to stay, and I’ve made my opinion on them well-known:
they are “meh”.
Despite their ever-presence, adding a flake input continues to be
a small annoyance that never goes away. It’s touted as a positive feature that flakes are
federated but the reality is that I want the simplicity of a centralized flake. That was the beauty and power of nixpkgs.
The process is: you want disko, so you add a url, then a follows so it stops dragging in its own nixpkgs, and then you do it again for
the next one. This has become a meme in the Nix community about how every flake drags in its own flake-utils.
So I wondered: could one flake carry every other flake, and you just reach in
for whatever you need? 🤯
omniflake is thousands of Nix flakes behind one flake input.
Once you have omniflake, you can use it like any other input.
Or nothing in a flake at all, straight from the command line:
It has an accessible website that you can visit https://omniflake.com/ to see the list of flakes it carries, and some helpful documentation.
Once added, you have access to nearly twelve thousand flakes, as of this writing, that you can access as needed lazily. You only pay for what you use.
This sounds absurd but it works. A flake with thousands of inputs should be unusable
but thanks to the laziness of the Nix language and the flake lock mechanism it works
perfectly.