A call for the Nix team to present a unified front on the outcome and strategy around Nix flakes

Valentin, if you truly mean that – and I hope you don’t – then fine. If that is what it takes to get clarity for Nix’s users about the status of flakes, then please: rip the bandaid off and call it done. Determinate will be the flag-bearer of flakes, and Nix can go on without them.

However, again, I hope you don’t. Because the data makes that look like a pretty crummy choice. Users have overwhelmingly chosen flakes. Flakes are the only axis on which new usage is really growing:

And looking at raw numbers isn’t very compelling, new repositories per day that aren’t flakes is flat over more than two years:

This is not a theoretical question or scenario anymore. This is a problem, and I feel dancing around it is not serving anybody well.

Like I said at NixCon last year: my only hope is the project chooses one way or another. Because not choosing is the worst option, and hurts everybody.

39 Likes

I do wish you would perform this measurement with a filter more meaningful than default.nix || shell.nix. I would just count repos with any nix files that don’t have a flake.nix file. I’m sure that’s somewhat common with files like configuration.nix, package.nix, $cabal_package_name.nix, etc. I mean I still wouldn’t be surprised if flakes end up more popular by that metric, but it’s very annoying that you keep using this flawed measurement.

13 Likes

Respectfully, I don’t think it matters very much. I’m sure I’m missing some percentage repositories in both sets that don’t put their flake.nix in the root, or use a differently named .nix.

At this point, I think the situation is less about absolute numbers, and more the Nix project taking ownership over what it wants, freeing the community from this miserable scenario, and make a decision that could end this whole argument with the stroke of a keyboard.

If that means the Nix project says goodbye to flakes – ok! I think that is a bad idea, but ok!

12 Likes

Respectfully, then I wish you wouldn’t have used numbers to make your point, especially since the numbers are flawed (probably not by too terribly much, but we’ll never know if you don’t redo the measurement)

10 Likes

If you have better numbers, you’re of course welcome to present them.

6 Likes

Hey @grahamc, any chance you can put devenv.nix on this graph?

5 Likes

I’ll try to! Right now, the throughput to collect the data is …challenging… it currently takes over an hour to process two hours of new repositories.

1 Like

Fair enough, is there source code?

3 Likes

mmm…not easily, it’s pretty tied up with some internal metrics tooling we have. I’ll chat with the team on monday if it’d be reasonably easy to break out a useful chunk.

6 Likes

@domenkozar

I did a quick experiment and was able to get data like this

From using a postgres fdw GitHub plugin | Steampipe Hub and github_search_code table | GitHub plugin | Steampipe Hub

However I did not take the time to figure out github api rate limiting and pagination. postgres steampipe cli tool or foreign data wrapper can take some of the steps out of retrieving api results like this.

my query was just

SELECT
    *
FROM
    github_search_code
WHERE
    query = 'filename:devenv.nix'

but could be expanded on with various rules, probably can filter on json responses about repo data like stars on repo etc etc haven’t tried it yet.

9 Likes

Oh man, this might obviate our horrible hack of data collecting :o!

4 Likes

@grahamc could be, but a showstopper maybe might be dealing with rate limits and pagination.

2 Likes

(or at least a pain point could be …)

1 Like

I submit that “popular” does not mean “good” or even “preferred”, and that in any case the aim of the Nix Team should not be product development for the masses but rather library development for use by other components of the ecosystem. Given the industry and this community’s problem with cargo-culting over understanding, this apparent popularity is instead an expected outcome from the proliferation of flakes-first Nix guides. I myself have followed many of these - including some produced by your team! - in the interest of getting things running quickly without needing to spelunk in the manuals, and until recently used a flake as the entrypoint to my own multi-platform configs. Flakes are a convenient UX over the Nix core features, and should be developed alongside - outside - the core. I broadly agree with Valentin on this point, though I would prefer the flake bits remain owned by the NixOS organization, to be developed not by the existing Nix Team but by a yet-to-be-created UX Team.

If flakes - which are not even functions - become the default unit of composition within the core Nix implementation, then we will have discarded a crowning achievement of computer science as a discipline, and as I have said elsewhere we should then return to the original thesis and consider a ground-up rework, with the knowledge gained from the past 18 years.

10 Likes

This post was flagged by the community and is temporarily hidden.

14 Likes

I genuinely mean this: if the Nix team thinks flakes should be removed, then they should choose that and go for it. This middle ground of not choosing is the biggest problem.

Personally, I think it is a mistake to remove them, but at this point – like I told Valentin a year ago, any choice is better than no choice.

10 Likes

Completely agree that a choice is better than no-choice. As a newcomer to nix/nixos it was confusing learning about how flakes are still experimental but almost every piece of info I’ve read nix recommended using them.

12 Likes

Of course, because Eelco, Graham, and their company detsys have been marketing them hard for years.

They are nevertheless terrible, not only did the problems I mentioned a year ago still exist:

Performance has now even dropped (!) due to the introduction of libgit2, which prompted me to leave nix behind entirely.

8 Likes

Of course, because Eelco, Graham, and their company detsys have been marketing them hard for years.
They are nevertheless terrible, not only did the problems I mentioned a year ago still exist:

As I’m not familiar about the pros/cons of flakes, I’m not gonna comment on that, but then there is this problem: as a newcomer I have to choose between a “terrible” implementation that has good documentation and a “good/proper” implementation that has abysmal documentation. Isn’t it obvious which will be chosen?

In my limited view of the situation this seems like a failure from the nix community to properly put out a documentation sane enough for anyone to be able to get things going fast.

9 Likes

What is this “good” implementation? I’d love to see it.

And you’ll have to ask the docs team about docs, they refuse to document flakes intentionally for reasons I don’t have insight into. But the community has documented flakes to death.

2 Likes