nixos-hardware
nixos-hardware copied to clipboard
Lenovo/T14s/AMD: Always sets the kernel to be `pkgs.linuxPackages_latest`
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?
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 That would be nice, then I could override it without mkForce I guess? :slightly_smiling_face:
Yes.