mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 18:41:34 +01:00
Improve clarity of the optimization option
This commit is contained in:
parent
ad3f4782dd
commit
a3f4c3d6a6
3 changed files with 7 additions and 4 deletions
28
modules/system/optimization.nix
Normal file
28
modules/system/optimization.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.optimization.mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.myConfig.optimization.mode == "powersave") {
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
charger = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
energy_performance_preference = "power";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue