about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorStu Small <stuart.alan.small@gmail.com>2024-06-08 12:54:56 -0600
committerStu Small <stuart.alan.small@gmail.com>2024-06-08 13:01:08 -0600
commit12bd55a1a346d773224e318a225c62f7f50aa3ee (patch)
tree94e3808ace7f5b8ce9eb0a4244b9346013cb415c /nixos
parentb0f9cc01958c5efe87947d28f8877abc04b9bd8d (diff)
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
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/power-profiles-daemon.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/power-profiles-daemon.nix b/nixos/modules/services/hardware/power-profiles-daemon.nix
index 05e5b7a00b420..7651c65b9f181 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 ];