From 01f1548e40f6f629d370bc43b4623b52b30fef85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:40:37 -0400 Subject: [PATCH] lenovo/thinkpad/x13s: source kernel through `config` instead of `pkgs` The previous implementation was sourcing the kernel 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`. --- lenovo/thinkpad/x13s/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lenovo/thinkpad/x13s/default.nix b/lenovo/thinkpad/x13s/default.nix index 161d3891..dd9159dc 100644 --- a/lenovo/thinkpad/x13s/default.nix +++ b/lenovo/thinkpad/x13s/default.nix @@ -1,10 +1,12 @@ -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: let + inherit (config.boot.kernelPackages) kernel; + dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb"; - dtb = "${pkgs.linux}/dtbs/qcom/${dtbName}"; + dtb = "${kernel}/dtbs/qcom/${dtbName}"; # Version the dtb based on the kernel - dtbEfiPath = "dtbs/x13s-${pkgs.linux.version}.dtb"; + dtbEfiPath = "dtbs/x13s-${kernel.version}.dtb"; cfg = { wifiMac = "e4:65:38:52:22:a9"; bluetoothMac = "E4:25:18:22:44:AA";