Updating linux kernel results in modules shrunk not in nix store

Trying to update my desktop config to the latest linux kernel (6.14) and I’m running into this error:

...linux-6.14-modules-shrunk/lib' is not in the Nix store

Here is my config dotfiles/users/eureka/systems/critter-tank/configuration.nix at 899bedb990cd48513fa82d8851a4b73a0e5ff844 · eureka-cpu/dotfiles · GitHub
though I’ve changed the following:

  boot.kernelPackages = with pkgs; builtins.trace "Built against kernel ${linuxPackages_latest.kernel.version}" linuxPackages_latest;
  hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;

I also tried a bunch of other linuxPackages_* and they all gave the same error.

Using this rev (without setting to latest) works with the above changes, but latest unstable does not.

    "nixpkgs": {
      "locked": {
        "lastModified": 1720750130,
        "narHash": "sha256-y2wc7CdK0vVSIbx7MdVoZzuMcUoLvZXm+pQf2RIr1OU=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "6794d064edc69918bb0fc0e0eda33ece324be17a",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    }

This gives me kernel 6.12.18

I’m worried your store is corrupted somehow. Can you try nix-store --verify --check-contents --repair (or nix store verify --all --no-trust --repair for newstyle CLI and output log)? This will verify all the data in the nix store

If I’m not using the latest unstable it works fine though. Also just ran that command and it finished without any output, so I’m assuming it passed.

1 Like

Hm. Well I tried building it with nix build github:eureka-cpu/dotfiles#nixosConfigurations.critter-tank.config.system.build.toplevel --update-input nixpkgs --no-write-lock-file and it succeeded. That’s why I thought it might be local corruption or something.

So, this appears to be the same issue as: Issue building linux kernel modules after Flake update

I made some discoveries, which I will post there.