nixcfg/hwModules/common/laptop/default.nix
Aly Raffauf cfe84295f8
Some checks failed
nix-build / default-build (push) Has been cancelled
nix-build / fallarbor-build (push) Has been cancelled
nix-build / lavaridge-build (push) Has been cancelled
nix-build / mauville-build (push) Has been cancelled
nix-build / petalburg-build (push) Has been cancelled
nix-build / rustboro-build (push) Has been cancelled
nix-build / slateport-build (push) Has been cancelled
nix-check / fmt-check (push) Has been cancelled
nix-check / eval-check (push) Has been cancelled
hw/laptop: remove libcamera battery drain workaround following upstream bump to 0.3.2
2024-11-07 21:32:39 -05:00

17 lines
509 B
Nix

{
lib,
pkgs,
...
}: {
services = {
power-profiles-daemon.enable = lib.mkDefault true;
udev.extraRules = ''
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="1", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set balanced"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="0", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set power-saver"
'';
upower.enable = lib.mkDefault true;
};
}