laptop: init (w/ logind lid switch events and auto-cpufreq)
This commit is contained in:
parent
5bca120e01
commit
e70698c848
1 changed files with 36 additions and 0 deletions
36
modules/nixos/system/laptop.nix
Normal file
36
modules/nixos/system/laptop.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend";
|
||||||
|
lidSwitchExternalPower = "lock";
|
||||||
|
lidSwitchDocked = "ignore";
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
tlp.enable = false;
|
||||||
|
power-profiles-daemon.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
energy_performance_preference = "power";
|
||||||
|
platform_profile = "cool";
|
||||||
|
turbo = "never";
|
||||||
|
|
||||||
|
enable_thresholds = true;
|
||||||
|
start_threshold = 50;
|
||||||
|
stop_threshold = 80;
|
||||||
|
};
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
energy_performance_preference = "performance";
|
||||||
|
platform_profile = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue