NixOS & Flakes Book | Home Page
NixOS flake introduction Links https://nixos-and-flakes.thiscute.world/
NixOS flake introduction Links https://nixos-and-flakes.thiscute.world/
Flakes are a feature in Nix for managing project dependencies and outputs in a self-contained and purely reproducible way. They use two main files: flake.nix: Declares the project’s inputs (dependencies, like a specific version of nixpkgs) and its outputs (packages, NixOS configurations, dev shells). flake.lock: An auto-generated file that pins the exact Git commit of every input, ensuring that builds are identical for everyone, everywhere. In short, flakes solve the problem of dependency management by locking versions explicitly, making projects truly portable and reproducible. They are the modern replacement for the older Nix channels system. ...