nixos-hardware icon indicating copy to clipboard operation
nixos-hardware copied to clipboard

Lenovo/T14s/AMD: Always sets the kernel to be `pkgs.linuxPackages_latest`

Open etu opened this issue 3 years ago • 3 comments

Currently the nixos-hardware for T14s/AMD (https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/t14s/amd/gen1/default.nix) it defaults to use of pkgs.linuxPackages_latest, this doesn't always work with third party kernel modules such as zfs or VirtualBox.

So to get my system to build I had to set the kernel myself:

{
  boot.kernelPackages = pkgs.linuxPackages_5_18;
}

However, this didn't work because the nixos-hardware module had already set the kernel to 5.19.

So I had to force it:

{
  boot.kernelPackages = lib.mkForce pkgs.linuxPackages_5_18;
}

Is this really right?

etu avatar Aug 10 '22 06:08 etu

Let's say it's a pragmatic value, if we would set a specific kernel than this option would quickly get out of date i.e. if linuxPackages_5_18 is removed. That's why we use in those cases _latest instead. We could however use lib.mkDefault to make overriding a bit easier.

Mic92 avatar Aug 10 '22 16:08 Mic92

@Mic92 That would be nice, then I could override it without mkForce I guess? :slightly_smiling_face:

etu avatar Aug 10 '22 16:08 etu

Yes.

Mic92 avatar Sep 03 '22 11:09 Mic92