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.

  • cathodebirdtube@lemmy.blahaj.zoneOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    2 months ago

    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

    • balsoft@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      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?

      • cathodebirdtube@lemmy.blahaj.zoneOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        Yeah it pulls some of the packages from cachix. Just not the kernel.

        that’s normal

        Thanks. This is valuable information for my future attempts at proper binary caches