From 6267b43af934ed22b2402b065ceeec3f9a276312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:34:19 -0400 Subject: [PATCH] hp/elitebook/830/g6: 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`. --- hp/elitebook/830/g6/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hp/elitebook/830/g6/default.nix b/hp/elitebook/830/g6/default.nix index 3b209b46..9e62264f 100644 --- a/hp/elitebook/830/g6/default.nix +++ b/hp/elitebook/830/g6/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ config, lib, ... }: { imports = [ ../../../../common/cpu/intel @@ -16,7 +16,7 @@ services.fwupd.enable = lib.mkDefault true; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; };