3 ms·
The best overall guide for flakes is likely the one from Serokell: https://serokell.io/blog/practical-nix-flakes https://serokell.io/blog/practical-nix-flakes.
by flurie 5y ago
The best overall guide for flakes is likely the one from Serokell: https://serokell.io/blog/practical-nix-flakes https://serokell.io/blog/practical-nix-flakes.
In the most basic, practical sense, flakes solve the standardization and pinpointing of two things: inputs, previously solved by things like niv, and outputs, making nix structures more standard and better able to coexist. Things like overlays, package outputs, nixos configurations, and even flake templates themselves all follow the same structure.
The result of all this is that, when I look at a non-flake repository, I may have to spend some time looking around to see what it does at a high level, and it may have its own special method of installation that usually begins with
this = import (builtins.fetchTarball "https://...")
You can start by converting any of the things I listed to flakes, and there is a module called flake-compat designed to provide backward compatibility for non-flakes. The Serokell guide is very helpful for this as well.