mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 07:29:43 +00:00
24 lines
524 B
Nix
24 lines
524 B
Nix
|
{ pkgs, lib, config, ...}: let
|
||
|
inherit (lib) mkIf;
|
||
|
deviceType = config.myOptions.device.roles.type;
|
||
|
acceptedTypes = ["laptop"];
|
||
|
in {
|
||
|
config = mkIf (builtins.elem deviceType acceptedTypes) {
|
||
|
hardware.acpilight.enable = true;
|
||
|
|
||
|
environment.systemPackages = with pkgs; [ acpi ];
|
||
|
|
||
|
# handle ACPI events
|
||
|
services.acpid.enable = true;
|
||
|
|
||
|
boot = {
|
||
|
kernelModules = ["acpi_call"];
|
||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||
|
acpi_call
|
||
|
cpupower
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|