Skip to content
Tech News
← Back to articles

One Nix flake to rule them all

read original more articles
Why This Matters

The article highlights the emergence of Omniflake, a single Nix flake that consolidates thousands of other flakes into one manageable source. This innovation addresses the complexity and fragmentation often associated with multiple flake inputs, offering a more streamlined and user-friendly experience for developers and users alike. It signifies a potential shift towards simplified dependency management in the Nix ecosystem, benefiting both industry professionals and consumers seeking efficiency.

Key Takeaways

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.

I refuse to accept this user experience.

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.

inputs . omniflake . url = "github:fzakaria/omniflake" ; inputs . omniflake . inputs . nixpkgs . follows = "nixpkgs" ;

Once you have omniflake, you can use it like any other input.

A package, in a shell or on a system:

environment . systemPackages = [ omniflake . flakes . nh . packages . ${ system } . default ];

... continue reading