2024-09-27 10:21:18 -04:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-10-20 16:11:21 -04:00
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"kernel.nmi_watchdog" = 0;
|
|
|
|
};
|
|
|
|
|
2024-09-27 10:21:18 -04:00
|
|
|
services = {
|
|
|
|
pipewire.wireplumber.extraConfig = {
|
|
|
|
# Pipewire eats battery by never disabling the camera.
|
|
|
|
"10-disable-camera" = {
|
|
|
|
"wireplumber.profiles" = {
|
|
|
|
main = {
|
|
|
|
"monitor.libcamera" = "disabled";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
power-profiles-daemon.enable = lib.mkDefault true;
|
|
|
|
|
|
|
|
udev.extraRules = ''
|
2024-11-07 20:18:06 -05:00
|
|
|
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"
|
2024-09-27 10:21:18 -04:00
|
|
|
'';
|
|
|
|
|
|
|
|
upower.enable = lib.mkDefault true;
|
|
|
|
};
|
|
|
|
}
|