mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 00:37:14 +08:00
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`.
25 lines
543 B
Nix
25 lines
543 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
imports = [
|
|
../../common/cpu/intel
|
|
../../common/gpu/nvidia/prime.nix
|
|
../../common/gpu/nvidia/ada-lovelace
|
|
../../common/pc/laptop
|
|
../../common/pc/ssd
|
|
];
|
|
|
|
# Enables ACPI platform profiles
|
|
boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") {
|
|
kernelModules = [ "hp-wmi" ];
|
|
};
|
|
|
|
# Enables Wifi and Bluetooth
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
hardware.nvidia.prime = {
|
|
intelBusId = "PCI:0:2:0";
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
};
|
|
}
|