install tlp on laptop
This commit is contained in:
parent
34b997ca9c
commit
293621c19c
2 changed files with 28 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
amd-gpu.enable = true;
|
amd-gpu.enable = true;
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
|
tlp.enable = true;
|
||||||
|
|
||||||
# config
|
# config
|
||||||
|
|
||||||
|
|
|
||||||
27
modules/nixos/features/tlp.nix
Normal file
27
modules/nixos/features/tlp.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
feature = "feature";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.${feature}.enable {
|
||||||
|
# Disable if devices take long to unsuspend (keyboard, mouse, etc)
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
services = {
|
||||||
|
power-profiles-daemon.enable = false;
|
||||||
|
tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
CPU_BOOST_ON_AC = 1;
|
||||||
|
CPU_BOOST_ON_BAT = 0;
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
STOP_CHARGE_THRESH_BAT0 = 95;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue