mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 14:23:55 -05:00
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
17 lines
509 B
Nix
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;
|
|
};
|
|
}
|