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`.
This commit is contained in:
Sebastián Zavala Villagómez 2025-04-28 02:40:37 -04:00 committed by mergify[bot]
parent 6e80224000
commit 01f1548e40

View file

@ -1,10 +1,12 @@
{ lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (config.boot.kernelPackages) kernel;
dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb"; dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb";
dtb = "${pkgs.linux}/dtbs/qcom/${dtbName}"; dtb = "${kernel}/dtbs/qcom/${dtbName}";
# Version the dtb based on the kernel # Version the dtb based on the kernel
dtbEfiPath = "dtbs/x13s-${pkgs.linux.version}.dtb"; dtbEfiPath = "dtbs/x13s-${kernel.version}.dtb";
cfg = { cfg = {
wifiMac = "e4:65:38:52:22:a9"; wifiMac = "e4:65:38:52:22:a9";
bluetoothMac = "E4:25:18:22:44:AA"; bluetoothMac = "E4:25:18:22:44:AA";