2024-07-26 23:07:07 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2024-06-23 19:58:12 +00:00
|
|
|
inherit (lib) mkIf;
|
|
|
|
deviceType = config.myOptions.device.roles.type;
|
|
|
|
acceptedTypes = ["laptop"];
|
|
|
|
in {
|
|
|
|
config = mkIf (builtins.elem deviceType acceptedTypes) {
|
|
|
|
hardware.acpilight.enable = true;
|
|
|
|
|
2024-07-26 23:07:07 +00:00
|
|
|
environment.systemPackages = with pkgs; [acpi];
|
2024-06-23 19:58:12 +00:00
|
|
|
|
|
|
|
# handle ACPI events
|
|
|
|
services.acpid.enable = true;
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
kernelModules = ["acpi_call"];
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
acpi_call
|
|
|
|
cpupower
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|