NixOS Unstable - error: linux 6.4 was removed because it reached its end of life upstream

Linux kernel is currently 6.5.5
Nvidia non-free driver 535.113.01 CUDA Version: 12.2

How do I figure out what kernel module is requiring the depreciated kernel 6.4? I am assuming it’s the Nvidia driver. Is there a way to specify an LTS kernel that is compatible with the latest Nvidia non-free drivers? I am only specifying the latest kernel in my configuration.nix. I am not yet using Flakes. Will this eventually be rectified when updates to the problematic kernel module are released? Or will I have to backup and rebuild the entire OS, going with stable instead of unstable?

At the moment, this is a show stopper as I cannot install security software updates, etc.

Ironically, everything is working better than it has in the recent past. This latest Nvidia driver has resolved several previous issues and things are very stable and functional.

Currently unable to sudo nixos-rebuild switch as it results in the errors below:

sudo nixos-rebuild switch

building Nix…
building the system configuration…
… while calling the ‘head’ builtin

     at /nix/store/0wi35kaqcj4k521i0fz5k7zskllkpicj-nixos/nixos/lib/attrsets.nix:850:11:

      849|         || pred here (elemAt values 1) (head values) then
      850|           head values
         |           ^
      851|         else

   … while evaluating the attribute 'value'

     at /nix/store/0wi35kaqcj4k521i0fz5k7zskllkpicj-nixos/nixos/lib/modules.nix:807:9:

      806|     in warnDeprecation opt //
      807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      808|         inherit (res.defsFinal') highestPrio;

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: linux 6.4 was removed because it reached its end of life upstream
1 Like

That error doesn’t happen because of a kernel module. It happens because someone set boot.kernelPackages = pkgs.linuxPackages_6_4; somewhere

1 Like

Found it:

environment.systemPackages = with pkgs; [

Boy do I feel dumb… It was right there in my list of pkgs starring me in the face.

Thanks for the nudge in the right direction.


don’t feel dumb, i’ve made worse mistakes.

You already super smart , because you’ve made the switch to Nix.

So that should make you feel smarter.

May be nix be with you, Always.

1 Like