Comment by lolinder

4 days ago

This is why I haven't switched my NixOS to flakes yet. The community discussions always act as though flakes should be the default that everyone should use now, but I figure that the developers know what they're doing and haven't made them the blessed path yet for a reason. So far so good—my system is far more stable than it was under Debian and I've yet to run into anything that didn't have an easy answer.

I have a suspicion that because the Nix community is disproportionately likely to contain early adopters, the general mood in the forums is less risk-averse than I am with my primary stacks.

> I figure that the developers know what they're doing and haven't made them the blessed path yet for a reason.

My take is: flakes don’t align with centralised nixpkgs and ultimately don’t solve any problems that can’t be solved without flakes.

They’re just an interface for a decentralised module system. You can use them, they’re feature-complete, and they don’t align with nixpkgs: it doesn’t make sense for individual packages to have their own flakes, nixpkgs can already be loaded as a flake.

FlakeHub tries to popularise flakes, but I don’t know if there is a flake discovery problem to solve.

Ekala Project is designing a poly-repo alternative to nixpkgs (ekapkgs) and they don’t embrace flakes.

So... Flakes have reached full maturity: a decentralised package format that has stalled its adoption status within the main Nix toolchain.

  • > My take is: flakes don’t align with centralised nixpkgs and ultimately don’t solve any problems that can’t be solved without flakes.

    I've turned to flakes to specifically solve some problems, and flaked solved them. To this day, flakes are still the only way to solve them.

    Flakes aren't default due to political reasons.

    • Yeah, I am flabbergasted that anyone can claim flakes don't solve problems. And yet, every SINGLE WEEK some newcomer gets tripped up on channels, managing them, realizing the root's channels are different than users, realizing their channels are out of sync on their multiple machines, no posting their channel revision when they solicit help. Not to mention pure eval. Not to mention transitive dependency overriding.

      3 replies →

    • > I've turned to flakes to specifically solve some problems, and flaked solved them. To this day, flakes are still the only way to solve them.

      Can you share some examples of such problems?

      3 replies →

  • Flakes bring you one interface to share common dependencies which is kot possible without an interface.

    • That interface could have been built in vanilla nix, though.

      Instead, a bunch of very useful features are bundled with flakes, like pure eval, eval caching, and git-awareness. But flakes still have some showstopping usability issues preventing users from benefiting from these great features. Issues like that it copies your repo root to the nix store on every evaluation, which scales terribly to bigger repos. Not to mention other issues like the extremely limited ability to override a flakes inputs - you can't pass a configured instance of nixpkgs for example.

      Generally speaking, the more advanced the use case, the more likely it is that flakes won't work well. Which probably helps explain why flakes are still unstable after so many years.

      3 replies →

    • Yes, they bring an interface.

      And lockfiles that are automatically maintained where digests are extracted into.

      Unlike if you do builtins.fetch* and pin those, in which case the digests end up in your source code.

I'm glad I'm not the only one who's grinding their gears with flakes.

I decided to migrate to flakes because a lot of the documentation for things I wanted to do with NixOS required flakes. It took me at least a few hours to understand what the purpose of them was though.

I just wish the documentation would be improved really, as an example https://nixos.wiki/wiki/Build_flags#Building_the_whole_syste... no longer works (gcc complains).

  • Be the change you want to see and help documenting the missing parts.

    Also that is the old wiki but the same stays in the new one.