# What if every Nix build were bit-reproducible?

**URL:** https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095
**Category:** Links
**Created:** [November 10, 2026, 5:26am UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095 "2026-11-10T05:26:28Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 10, 2026, 5:26am UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/1 "2026-11-10T05:26:28Z")

</div>

> **[What if every Nix build were bit-reproducible?](https://fzakaria.com/2026/11/09/what-if-every-nix-build-were-bit-reproducible)**
>
> The holy grail of build systems and package managers is bit-reproducible1 builds. This is such a desired trait that nearly every Linux distribution has a reproducible builds project to track the progress and validity of their builds. Why is...

Disclaimer: AI used for SVG generation

---

<div class="post-metadata">

### Author: ![7c6f434c](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/7/8e7dd6/32.png) [@7c6f434c](https://discourse.nixos.org/u/7c6f434c)
#### Post date: [November 10, 2026, 10:55am UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/2 "2026-11-10T10:55:42Z")

</div>

Does reproducibility promise of Rewind extend to CPU-feature-detecting builds reproduced on an underlying CPU with different feature support (let’s say same vendor but different generations)?

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 10, 2026, 5:18pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/3 "2026-11-10T17:18:56Z")

</div>

Yes, the CPUID is set to a fixed variant to make the hardware detection reproducible as well.

---

<div class="post-metadata">

### Author: ![7c6f434c](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/7/8e7dd6/32.png) [@7c6f434c](https://discourse.nixos.org/u/7c6f434c)
#### Post date: [November 10, 2026, 5:23pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/4 "2026-11-10T17:23:42Z")

</div>

So there is an implicit «how far back CPUs are supported» not exposed explicitly (and needing to add the list of available functionality to change, probably)?

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 10, 2026, 5:32pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/5 "2026-11-10T17:32:40Z")

</div>

The guest’s CPU is a named model, --cpu, and the model is one of the inputs for the replay.  
There is support for “v3” which x86-64-v3 is roughly Haswell and Zen 1 onward.  
(We could add more like v4 with AVX-512)

The vendor is also an input (AMD vs Intel). The branch counter used for the clock behaves differently on AMD and Intel, so a run is tied to its vendor.

---

<div class="post-metadata">

### Author: ![clhodapp](https://discourse.nixos.org/user_avatar/discourse.nixos.org/clhodapp/32/6865_2.png) [@clhodapp](https://discourse.nixos.org/u/clhodapp)
#### Post date: [November 10, 2026, 9:47pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/6 "2026-11-10T21:47:24Z")

</div>

[Bootstrapping the Verified Software Stack | Theorem](https://theorem.dev/blog/verified-software-stack/) seems very relevant, both because reproducibility might be something interesting to formally prove and because it seems like a lot of their findings would apply to pretty much any “closure property” you are trying to apply.

Based on their analysis, if we could go reproducible for just a small set of key packages, the number of sweeping rebuilds in nixpkgs might drop severely.

---

<div class="post-metadata">

### Author: ![kiara](https://discourse.nixos.org/user_avatar/discourse.nixos.org/kiara/32/37249_2.png) [@kiara](https://discourse.nixos.org/u/kiara)
#### Post date: [November 11, 2026, 9:35am UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/7 "2026-11-11T09:35:23Z")

</div>

cool, i’d heard talk of deterministic VMs but hadn’t actually seen any implementations in open-source.  
it would sound like a good use-case of such a VM might be CI runs where in case of failures one could easily reproduce them.  
i’d wonder if there have been any such CI setups out there then.

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 11, 2026, 4:06pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/8 "2026-11-11T16:06:31Z")

</div>

As long as your CI workers advertise KVM it works wonderfully.  
There is also an online viewer [Rewind VM viewer](https://rewindvm.dev/viewer/) you can hyperlink to in the PR comment so that you can see the trace (more limited then running it locally)

---

<div class="post-metadata">

### Author: ![lisanna](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lisanna/32/36988_2.png) [@lisanna](https://discourse.nixos.org/u/lisanna)
#### Post date: [November 11, 2026, 5:00pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/9 "2026-11-11T17:00:43Z")

</div>

What about thread parallelism? How deterministic is the kernel scheduler in this VM?

I’ve done work on making rust builds determistic and sometimes what happens is the multithreaded lto generates a different result each time.

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 11, 2026, 5:26pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/10 "2026-11-11T17:26:47Z")

</div>

That’s the whole motivation of projects like these.  
The signals and thread schedule are deterministic.

The app even shows you the context switches and you can replay it and fork it at any point and generate new interleavings (to find bugs)

---

<div class="post-metadata">

### Author: ![lisanna](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lisanna/32/36988_2.png) [@lisanna](https://discourse.nixos.org/u/lisanna)
#### Post date: [November 11, 2026, 6:11pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/11 "2026-11-11T18:11:47Z")

</div>

Sounds a lot like anitithesis’s program

---

<div class="post-metadata">

### Author: ![kiara](https://discourse.nixos.org/user_avatar/discourse.nixos.org/kiara/32/37249_2.png) [@kiara](https://discourse.nixos.org/u/kiara)
#### Post date: [November 11, 2026, 7:51pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/12 "2026-11-11T19:51:50Z")

</div>

ah, no networking just yet, huh?  
maybe that sounds different from traditional CI jobs then. 😅

---

<div class="post-metadata">

### Author: ![7c6f434c](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/7/8e7dd6/32.png) [@7c6f434c](https://discourse.nixos.org/u/7c6f434c)
#### Post date: [November 12, 2026, 10:16am UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/13 "2026-11-12T10:16:02Z")

</div>

> [@kiara](#):
>
> ah, no networking just yet, huh?

If we are talking about the nix-wrapped version, networking would be for fixed-output builds only anyway!

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 12, 2026, 3:33pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/14 "2026-11-12T15:33:52Z")

</div>

If you need network access all sources are downloaded first like mentioned (FOD).  
If your tests call out to the Internet… You have bigger fish to fry 😅

---

<div class="post-metadata">

### Author: ![iwanb](https://discourse.nixos.org/user_avatar/discourse.nixos.org/iwanb/32/4268_2.png) [@iwanb](https://discourse.nixos.org/u/iwanb)
#### Post date: [November 13, 2026, 6:27pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/15 "2026-11-13T18:27:58Z")

</div>

Cool stuff!

I randomly found out that hermit (a user space deterministic runner) has something very similar as an example!

> **[hermit/examples/nix at main · facebookexperimental/hermit](https://github.com/facebookexperimental/hermit/tree/main/examples/nix)**
>
> main/examples/nix

---

<div class="post-metadata">

### Author: ![fzakaria](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fzakaria/32/2643_2.png) [@fzakaria](https://discourse.nixos.org/u/fzakaria)
#### Post date: [November 13, 2026, 6:42pm UTC](https://discourse.nixos.org/t/what-if-every-nix-build-were-bit-reproducible/81095/16 "2026-11-13T18:42:25Z")

</div>

Oh interesting; it looks newly added.  
Hermit is really cool so is the underlying library reverie.
