Scaling Nix
Nix's wide adoption has stretched it to the breaking point, as it's being applied far beyond what it was originally built for: a moderately-sized Nixpkgs. To misquote Niklaus Wirth, "Nix is getting faster more slowly than Nixpkgs is getting slower". And it's not just Nixpkgs and NixOS growing beyond what Nix was designed for; enterprise users routinely apply Nix to giant monorepos and huge derivation graphs that are heavily taxing Nix's machinery. This leads to a dismal user experience with long evaluation and CI times.
In this talk, I will discuss a number of efforts (some ongoing, some finished) to make Nix more scalable, including:
- Parallel evaluation
- Lazy source trees
- Baked flakes
- Sparse flake lock files
- Binary cache protocol improvements
- Lazy store path fetching in CI
builtins.wasm- A scalable alternative to the NixOS module system
Together, these features make Nix a much more pleasant experience for large projects.
Eelco Dolstra started the Nix project as a PhD student at Utrecht University. He is a co-founder at Determinate Systems.