diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 4fefc37d4..60e9e4d3d 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,4 +1,8 @@ { lib, pkgs, config, ... }: +let + fwVersion = pkgs.linux-firmware.version; + oldLinuxFirmware = if (lib.hasPrefix "unstable" fwVersion) then (lib.versionOlder fwVersion "unstable-2023-02-10") else (lib.versionOlder fwVersion "20230210"); +in { imports = [ ../../../../../common/pc/laptop/acpi_call.nix @@ -12,7 +16,7 @@ # Wifi support - hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; + hardware.firmware = lib.mkIf oldLinuxFirmware [ pkgs.rtw89-firmware ]; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index f6bb75aff..15c03effb 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -1,12 +1,15 @@ - { lib, pkgs, ... }: - +let + fwVersion = pkgs.linux-firmware.version; + oldLinuxFirmware = if (lib.hasPrefix "unstable" fwVersion) then (lib.versionOlder fwVersion "unstable-2023-02-10") else (lib.versionOlder fwVersion "20230210"); +in { imports = [ ../. ]; + # Wifi support - hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; + hardware.firmware = lib.mkIf oldLinuxFirmware [ pkgs.rtw89-firmware ]; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;