mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-27 02:11:55 -05:00
28 lines
718 B
Nix
28 lines
718 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
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 = ''
|
|
SUBSYSTEM=="power_supply", ATTR{online}=="1", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set balanced"
|
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set power-saver"
|
|
'';
|
|
|
|
upower.enable = lib.mkDefault true;
|
|
};
|
|
}
|