From e5c56044488140e860164de7c0d7b527f1222d2f Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 30 Oct 2024 09:43:41 -0500 Subject: [PATCH] auto-cpufreq: allow integers for frequency Signed-off-by: Myned --- options/custom/services/auto-cpufreq.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options/custom/services/auto-cpufreq.nix b/options/custom/services/auto-cpufreq.nix index 8696920..26527b5 100644 --- a/options/custom/services/auto-cpufreq.nix +++ b/options/custom/services/auto-cpufreq.nix @@ -30,7 +30,7 @@ in { energy_performance_preference = "balance_power"; governor = "powersave"; platform_profile = "low-power"; - scaling_max_freq = mkIf (isFloat cfg.max.battery) (builtins.floor (cfg.max.battery * 1000 * 1000)); # KHz + scaling_max_freq = mkIf (isFloat cfg.max.battery || isInt cfg.max.battery) (builtins.floor (cfg.max.battery * 1000 * 1000)); # KHz #// turbo = "never"; # Only works with acpi-cpufreq }; @@ -38,7 +38,7 @@ in { energy_performance_preference = "balance_performance"; governor = "powersave"; platform_profile = "balanced"; - scaling_max_freq = mkIf (isFloat cfg.max.charger) (builtins.floor (cfg.max.charger * 1000 * 1000)); # KHz + scaling_max_freq = mkIf (isFloat cfg.max.charger || isInt cfg.max.charger) (builtins.floor (cfg.max.charger * 1000 * 1000)); # KHz }; }; };