system/hardware/power: move to services, add upower

This commit is contained in:
Anthony Rodriguez 2024-10-03 11:18:00 +02:00
parent 837182ae0c
commit d42e9005e5
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
3 changed files with 13 additions and 4 deletions

View file

@ -19,8 +19,8 @@ let
laptop = laptop =
common common
++ [ ++ [
./hardware/power.nix
./hardware/fprintd.nix ./hardware/fprintd.nix
./services/power.nix
./services/keyd.nix ./services/keyd.nix
]; ];
in { in {

View file

@ -1,3 +0,0 @@
{
services.power-profiles-daemon.enable = true;
}

12
system/services/power.nix Normal file
View file

@ -0,0 +1,12 @@
{
services = {
logind.extraConfig = ''
HandlePowerKey=suspend
'';
power-profiles-daemon.enable = true;
# battery info
upower.enable = true;
};
}