Add laptop role and set up TLP.
This commit is contained in:
parent
2a53a19be3
commit
444a1955d9
2 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../roles/laptop.nix
|
||||||
../../roles/zfs.nix
|
../../roles/zfs.nix
|
||||||
../../base.nix
|
../../base.nix
|
||||||
../../users/root.nix
|
../../users/root.nix
|
||||||
|
|
12
roles/laptop.nix
Normal file
12
roles/laptop.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
|
||||||
|
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||||
|
};
|
||||||
|
};
|
||||||
|
powerManagement.enable = true;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue