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