Add upower for laptop battery

This commit is contained in:
Kiana Sheibani 2022-03-03 13:01:09 -05:00
parent d9eaf8b8b7
commit 3995376fc0
2 changed files with 11 additions and 0 deletions

10
laptop/config/battery.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
services.upower = {
enable = true;
usePercentageForPolicy = true;
percentageLow = 15;
percentageCritical = 5;
};
}

View file

@ -3,6 +3,7 @@ let hashedPassword = "$6$y3eb1phxFWnParRT$w1LNfxJ2ByHoiBa5ywh4STGuIK/r4Tnyxx2Xe/
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./battery.nix
]; ];
networking.hostName = "kiana-laptop"; networking.hostName = "kiana-laptop";