My config: https://github.com/Aesistril/nixos-config
I am on Microsoft Surface Pro 9. It requires a custom kernel which needs to be compiled in the case of NixOS.
I added the kernel to my config according to the instructions provided in nix-hardware repo. Then I installed nix package manager on Fedora and started compiling in the background while I did some other work. The idea was to push it to cachix so my NixOS install could pull it without needing to compile.
The problem is kernel being compiled on different installations of nix package manager results in different hashes, even when they are using identical configs. It does not pull from cachix which i am sure i set up correctly.
https://aesis-cache-surface.cachix.org/ is my cache.
As a test I did a full, successful, build. Pushed the results to cachix. mv’d the resulting /nix directory to /nix.success.
/nix/store/yg3hr2jl4bq0c6bkchajnszza9vi9vm8-linux-6.15.9 is the result of nix.success and the version stored in the cache
And after running mv I did a second build. Instead of pulling from cachix; it started building this, which is the same thing but with as different hash.
/nix/store/873nppq3pby37w9jxiw6vbv87fczynx2-linux-6.15.9.drv
And yes the git tree was clean and there was absolutely no warnings during nix build. It just misses the cache for some reason
Unrelatedly, nix pulls gnome-desktop even when my DE is set to KDE. I am not sure why.


The
.drvfile 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?
Yeah it pulls some of the packages from cachix. Just not the kernel.
Thanks. This is valuable information for my future attempts at proper binary caches