From dab7ecc0542c024f9725216edfbddefafc910413 Mon Sep 17 00:00:00 2001 From: Danylo Hlynskyi Date: Fri, 20 Oct 2017 22:59:31 +0300 Subject: [PATCH] nixos-generate-config: lessen priority for cpuFreqGovernor (#30221) In particular, it conflicts with `services.tlp.enable` option. There exists workaround: ``` powerManagement.cpuFreqGovernor = lib.mkForce null; services.tlp.enable = true; ``` But should it? --- nixos/modules/installer/tools/nixos-generate-config.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 926d1e3133f7..c0df2977856e 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -103,7 +103,7 @@ if (-e "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors") { foreach $e (@desired_governors) { if (index($governors, $e) != -1) { - last if (push @attrs, "powerManagement.cpuFreqGovernor = \"$e\";"); + last if (push @attrs, "powerManagement.cpuFreqGovernor = lib.mkDefault \"$e\";"); } } }