mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57: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`.
26 lines
723 B
Nix
26 lines
723 B
Nix
{ config, lib, ... }:
|
|
{
|
|
imports = [
|
|
../../../../common/cpu/intel
|
|
../../../../common/pc/laptop
|
|
../../../../common/pc/laptop/ssd
|
|
];
|
|
|
|
# Needed for wifi
|
|
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
|
|
|
# Cooling management
|
|
services.thermald.enable = lib.mkDefault true;
|
|
|
|
# Allows for updating firmware via `fwupdmgr`.
|
|
services.fwupd.enable = lib.mkDefault true;
|
|
|
|
# Enables ACPI platform profiles
|
|
boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") {
|
|
kernelModules = [ "hp-wmi" ];
|
|
};
|
|
|
|
# reduces warnings/errors in boot log, seems to eliminate the ocassional boot hangs described in readme
|
|
hardware.enableAllFirmware = lib.mkDefault true;
|
|
}
|