Skip to content

Commit 6e80224

Browse files
sebaszvmergify[bot]
authored andcommitted
lenovo/thinkpad/p14s: check kernel version through config instead of pkgs
The previous implementation was checking the kernel version through `pkgs.linux`, which is only representative of the final system if `boot.kernelPackages` is left as the default value of `pkgs.linuxPackages`. You can of course change this to other package sets, such as `pkgs.linuxPackages_latest`. Instead, we now reference the kernel through `config.boot.kernelPackages.kernel`.
1 parent 6267b43 commit 6e80224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lenovo/thinkpad/p14s/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, pkgs, ... }:
1+
{ config, lib, pkgs, ... }:
22

33
{
44
# P14s is a rebadged T14 with slight internal differences.
@@ -14,7 +14,7 @@
1414
# "vendor" setting, in this case the thinkpad_acpi driver.
1515
# See https://hansdegoede.livejournal.com/27130.html
1616
# See https://lore.kernel.org/linux-acpi/[email protected]/
17-
boot.kernelParams = lib.mkIf (lib.versionOlder pkgs.linux.version "6.2") [ "acpi_backlight=native" ];
17+
boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") [ "acpi_backlight=native" ];
1818

1919
# see https://github.com/NixOS/nixpkgs/issues/69289
2020
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;

0 commit comments

Comments
 (0)