hosts | add auto-cpufreq, switch loki & smaug to use, formating
This commit is contained in:
parent
b7ca0e0020
commit
43fe882270
5 changed files with 54 additions and 7 deletions
30
hosts/workstation/auto-cpufreq.nix
Normal file
30
hosts/workstation/auto-cpufreq.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.roles.auto-cpufreq;
|
||||
in {
|
||||
options.roles.auto-cpufreq = {enable = mkEnableOption "roles auto-cpufreq";};
|
||||
config = mkIf cfg.enable {
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
enable_thresholds = true;
|
||||
start_threshold = 50;
|
||||
stop_threshold = 80;
|
||||
};
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue