pinwheel: Replace tlp module with power (including upower)

This commit is contained in:
Alexander Heldt
2023-11-30 10:19:56 +01:00
parent 8500692902
commit d3f5eaddb0
2 changed files with 8 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
{ lib, config, ... }:
let
enabled = config.mod.power.enable;
in
{
options = {
mod.power = {
enable = lib.mkEnableOption "enable power module";
};
};
config = lib.mkIf enabled {
services = {
upower = {
enable = true;
};
tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0=75;
STOP_CHARGE_THRESH_BAT0=80;
};
};
};
};
}