How can I learn about flakes?

But flakes do not come in isolation, they come with pure eval and bugs and eval-time penalties and etc etc.

Except these bugs get rediscovered by every new user and they get bewildered and come here. It seems handwavey and out-of-touch to put it this way; it reminds me of maths profs/textbooks that say “proof is trivial” and then actually writing it out it ends up being 500 pages long. No matter how you look at it, the bugs are the API.

Anyway @ammaratef45, here’s an explainer for flakes:

And here’s how you can achieve some of the same input pinning goals without flakes (this predates system.nix):

With system.nix:

One of flakes’ 57 goals is to provide a unified API for consumers of projects, hence you would see a flake.nix in a project repo and the attributes returned by the outputs function explain what the flake provides. Alternatively you can use nix flake show <flake-url> to see a summary of said flake outputs.

These outputs are then used by the so-called “nix 3” interface which is basically everything under section 8.5 of the nix manual: Experimental Commands - Nix 2.35.2 Reference Manual
Different commands will need/expect different outputs, they are documented in a pretty scattershot way in the manual but it is ultimately all there.

Flakes - Official NixOS Wiki has a bit of info but it’s not 100% comprehensive nor does it provide the full context. Still it may be helpful as a summary of the various supported outputs.