| Add the first three posts bf3cf90 Romain Gautier 17h ago | 1 | +++ |
| 2 | date = '2026-02-14T10:30:00+01:00' |
| 3 | draft = false |
| 4 | title = 'Nix Flakes for Reproducible Builds' |
| 5 | summary = 'Notes on pinning tool versions with Nix flakes.' |
| 6 | +++ |
| 7 | |
| 8 | Nix flakes make it easy to pin exact versions of dependencies, like the Hugo |
| 9 | binary used to build this blog, so every contributor gets identical builds |
| 10 | without relying on a system-wide package manager. |
| 11 | |
| 12 | ## Pinning Hugo |
| 13 | |
| 14 | The `flake.nix` in this repo pins an exact Hugo release through |
| 15 | `nixpkgs-multiverse`: |
| 16 | |
| 17 | ```nix |
| 18 | hugo = mv.version "hugo" "0.166.0"; |
| 19 | ``` |
| 20 | |
| 21 | Running `nix develop` drops that version onto `PATH`, and `nix build` uses |
| 22 | the same pin to produce the site. |
| 23 | |
| 24 | {{% alert "tip" %}} |
| 25 | **Tip:** Pin the version once, in one file, and every machine that runs |
| 26 | `nix build` gets byte-identical output. |
| 27 | {{% /alert %}} |