9.5 Flake inputs in depth: follows, flake = false and lock file size
Lesson 63 of 68 · 20:21
Up next in 5s…
About this lesson
Flake inputs look simple until your flake.lock starts pulling in the dependencies of your dependencies. In this lesson we measure what each input really costs on a real project, then take control with the follows mechanism and flake = false. You watch a lock closure double to 400 MB and shrink back down.
In this video
- Measuring input sizes with
flake-du, and how one innocent-looking input change doubled the locked closure - What
inputs.x.followsreally does, drawn as arrows between flakes that you learn to bend in both directions flake = false: treating an input as a plain folder and ignoring its lock file entirely- Why
followsdoes not replace overlays, and which one you need to inject security patches across a dependency chain - The trade-off nobody mentions: redirecting another flake's nixpkgs costs you their cache and their test guarantees
After this lesson
You can read and reshape any flake.lock, keep it small on purpose, and explain to your team when follows helps and when only an overlay will do.
Builds on: Anatomy of a flake: inputs, outputs and the lock file (9.2)
Links: