1 { config, lib, pkgs, ... }:
3 hardware.acpilight.enable = true;
4 boot.kernelModules = [ "msr" "acpi_cpufreq" ];
5 systemd.services.acpid.postStart = ''
6 ${pkgs.acpi}/bin/acpi -a | grep -q 'Adapter .*: on-line' ||
7 ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave
13 event = "video/brightnessdown.*";
14 action = "${pkgs.acpilight}/bin/xbacklight -dec 10";
17 event = "video/brightnessup.*";
18 action = "${pkgs.acpilight}/bin/xbacklight -inc 10";
25 ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave;;
26 00000001) # plugged in
27 ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g ondemand;;