From 12bd55a1a346d773224e318a225c62f7f50aa3ee Mon Sep 17 00:00:00 2001 From: Stu Small Date: Sat, 8 Jun 2024 12:54:56 -0600 Subject: [PATCH] nixos/power-profiles-daemon: Add assertion with auto-cpufreq auto-cpufreq is similar to tlp in that it shouldn't be run with power-profiles-daemon. There functionality can conflict and bugs can show up. On my system this materialized by auto-cpufreq frequently shutting down, but there may be other consequences. This change follows the same pattern as the tlp assertion --- nixos/modules/services/hardware/power-profiles-daemon.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/hardware/power-profiles-daemon.nix b/nixos/modules/services/hardware/power-profiles-daemon.nix index 05e5b7a00b42..7651c65b9f18 100644 --- a/nixos/modules/services/hardware/power-profiles-daemon.nix +++ b/nixos/modules/services/hardware/power-profiles-daemon.nix @@ -39,6 +39,12 @@ in which conflicts with services.tlp.enable = true; ''; } + { assertion = !config.services.auto-cpufreq.enable; + message = '' + You have set services.power-profiles-daemon.enable = true; + which conflicts with services.auto-cpufreq.enable = true; + ''; + } ]; environment.systemPackages = [ cfg.package ];