1
0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-06-02 11:03:33 +02:00

cpu/amd/igpu: change condition to check actually used kernel version

Change condition to check actually used kernel version instead of which kernel version is the default.
Without this change, if a user changes the kernel version to a newer version, the kernel parameter will not actually be added.
This commit is contained in:
Luflosi 2024-02-15 21:12:20 +01:00
parent f1b2f71c86
commit 8883f4ae15
No known key found for this signature in database
GPG Key ID: 743C5DD6900A1FF0

View File

@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ lib, pkgs, config, ... }:
{
# Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old
@ -10,10 +10,9 @@
boot = lib.mkMerge [
(lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["amdgpu.sg_display=0"];
})
(lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.2") {
(lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") {
kernelParams = ["amdgpu.sg_display=0"];
})
];