feat: add option for services.tlp.settings with defaults
This commit is contained in:
parent
ad7f6bf039
commit
2c09c21833
3 changed files with 48 additions and 6 deletions
|
|
@ -3,6 +3,30 @@
|
|||
# options affecting multiple modules
|
||||
options.bchmnn = with lib; {
|
||||
|
||||
power = {
|
||||
tlp = {
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf (oneOf [ bool int float str (listOf str) ]);
|
||||
default = {
|
||||
# performance | powersave
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
# performance | balance_performance | default | balance_power | power
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
# performance | balanced | low-power
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 100;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
gui = {
|
||||
enable = mkEnableOption "gui";
|
||||
greeter = {
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@
|
|||
|
||||
services.tlp = {
|
||||
enable = !builtins.elem "gnome" gui.flavour;
|
||||
settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "balanced";
|
||||
};
|
||||
settings = power.tlp.settings;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue