mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
omen/*: 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`.
This commit is contained in:
parent
01f1548e40
commit
232c204afb
5 changed files with 10 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables ACPI platform profiles
|
# 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" ];
|
kernelModules = [ "hp-wmi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables ACPI platform profiles
|
# 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" ];
|
kernelModules = [ "hp-wmi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables ACPI platform profiles
|
# 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" ];
|
kernelModules = [ "hp-wmi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables ACPI platform profiles
|
# 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" ];
|
kernelModules = [ "hp-wmi" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables ACPI platform profiles
|
# 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" ];
|
kernelModules = [ "hp-wmi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue