pinwheel: Replace tlp module with power (including upower)
This commit is contained in:
28
hosts/pinwheel/modules/power/default.nix
Normal file
28
hosts/pinwheel/modules/power/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user