has anyone seen an explanation of nix flakes that explains the design goals of flakes & the fundamental problems they're trying to solve before diving into the syntax?

i'm looking for something like:

* the goal of flakes is to let people define packages in an uncoordinated way without a central repository
* the problem is that coordinating dependencies: you could easily end up with an explosion where you end up installing 1000 versions of libc
* the way flakes address that problem is ???

someone in the replies gave the analogy that nix flakes are like docker containers (and they use a lot of disk space for the same reasons that docker containers do: they pin versions of all their deps) but with the advantage that:

* they run natively (no VM on mac)
* different flakes can share dependencies sometimes
* there’s a lot more structure

the comparison to containers makes it SO much clearer to me

the way I feel about nix after using it for 10 months (mostly baffled, 80% of my experience feels like random things happening that I have 0 insight into) is giving me some empathy for how people must feel about git

Follow

@b0rk

I think I had the same feeling. In both cases I initially found a lot of descriptions aimed to using git/nix for various things, which didn't help at all with building a model of how things work. For git the thing that made me understand it was a description (that I since lost track of) that described all the typical operations in terms of how they affect the commit graph (and described explicitly that commits are actually trees and the diffs are just diffs between them). For nix, the thing that helped me in a similar way was nixos.org/guides/nix-pills/, even though they felt less complete.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.