In that case, I can't in good conscience recommend we use such a feature at my workplace. We can't afford huge breaking changes, which is what that flag suggests. Which means my workplace is stuck with a bunch of `shell.nix` and `direnv` magic instead of clean flake-based envs.
It's not enough to gate features behind a flag, unless your only audience is enthusiasts. Versioning your features makes them accessible to a wider audience and encourages more risk-averse folks to adopt the features despite the possibility that they may undergo slight changes.
just pin the nix package itself and that should ensure the flake API remains consistent for however many months/years you want?
This is true of literally any dependency, though.
Semver is supposed to grant you confidence that things won't change very much, but it's not a technical guarantee.
In terms of "risk of adopting nix flakes", the lion's share of the risk is in "adopting nix" (because nix is difficult, hard to find people well versed in nix, etc.). The risks from adopting flakes on top of that are marginal.
> Which means my workplace is stuck with a bunch of `shell.nix` and `direnv` magic instead of clean flake-based envs.
if flakes win out, this other stuff might well be deprecated someday. timeline for that is probably lengthier than the timeline where flakes don’t win, but it’s still there. in either scenario you’re gonna have a month or more between one approach being deprecated and being dropped altogether (6 months if you’re on the stable channel). you’re implicitly betting for or against the success of flakes here, weighted by the cost of refactoring should you bet on the “losing” side plus maintenance until the winner emerges. you describe non-flake maintenance as being higher cost, so from the outside it just feels like a suspicious bet to make.
That kind of circular reasoning seems problematic.
Don't get me wrong, I like flakes, I use them for my NixOS setup, but the way that flakes development has been handled is very concerning.
You sound like you have something particular in mind.
If I look at the Nix RFCs, flakes was as RFC 0049 https://github.com/NixOS/rfcs/pull/49
Maybe Alyssa's comment here? https://github.com/NixOS/rfcs/pull/136#discussion_r987278726
+1. The explosive growth has resulted in organic blossoming of several new ideas, approaches and templates. Not all of them are great and it takes time to sift through them to see if there are canonical approaches.
The creation of the team to streamline these ideas, bless some official paths is well timed.
> In this case, "it's experimental" should be read as "maybe the team will decide to make changes", rather than "it's not going to work half the time".
This I think is part of the problem. People see the "experimental" label and don't understand that it's not "experimental" in the sense they're used to. Maybe labeling flakes as a "beta" feature and featuring the documentation more prominently would ease the confusion.
This is exactly the clarification that needs to happen. It hasn't yet, and we've been needing it. That's what I mean by "floundering". Nix isn't broken, but its development progress has been needing explicit direction and clarity.
That's why I'm excited to hear a team is being put together. This is a great opportunity to bring some decisiveness into Nix's development.
In this case, "it's experimental" should be read as "maybe the team will decide to make changes", rather than "it's not going to work half the time".
e.g. one change they made was changing the property "defaultPackage" to "packages.default".
(Anyway, the UX improvements from flakes are good, that once you've got the boilerplate, flakes are amazing).
> Nix is technologically sound but is struggling organizationally from its explosive growth
Well, that's the opposite problem of 'floundering'.