Not sure I can help with caching but you're confusing the derivation and build result. Both end up in the nix store but the derivations are just files with the .drv extension. The build artefacts have a hash based on the derivation, but it is different. I think they are both deterministic as long as you don't change config or update channel/flake dependencies. Can you check both paths in the nix store and try rebuilding?
this post was submitted on 15 Jan 2026
1 points (100.0% liked)
Nix / NixOS
2759 readers
2 users here now
Main links
Videos
founded 3 years ago
MODERATORS
No, I know what .drv means. Its there because i copied a line from the terminal. I tried rebuilding with the exact same, clean git tree and it still did not pull from cachix.
I am guessing there is probably some things in the kernel that depend of build date but I didn't confirm my hypothesis by diffing .drv files. Instead I just used nixos-generators to build a raw disk image on fedora and flashed it with dd
It works
The .drv file and the output will have different hashes in their paths, that's normal. You need to compare either the derivations or the outputs, they hashes should match there for everything to work.
Are you sure you've set up the cachix correctly on your laptop?