summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2020-02-22 12:45:47 +0100
committerAtemu <atemu.main@gmail.com>2020-08-22 10:42:20 +0200
commited83bac1d98aa3818331685d968444dbda66dc28 (patch)
tree2d89a95d194a0e9b8166d2f9563097a369819ec9 /nixos/modules
parente6f0a1e7ebceac4e25150384008f5b051aa8be03 (diff)
downloadnixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar.gz
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar.bz2
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar.lz
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar.xz
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.tar.zst
nixpkgs-ed83bac1d98aa3818331685d968444dbda66dc28.zip
undervolt: make timer opt-in
It should no longer be needed but is worth keeping around in case it is
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/hardware/undervolt.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix
index 1f1a6d67478..054ffa35050 100644
--- a/nixos/modules/services/hardware/undervolt.nix
+++ b/nixos/modules/services/hardware/undervolt.nix
@@ -103,6 +103,17 @@ in
         The temperature target on battery power in Celsius degrees.
       '';
     };
+
+    useTimer = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to set a timer that applies the undervolt settings every 30s.
+        This will cause spam in the journal but might be required for some
+        hardware under specific conditions.
+        Enable this if your undervolt settings don't hold.
+      '';
+    };
   };
 
   config = mkIf cfg.enable {
@@ -126,7 +137,7 @@ in
       };
     };
 
-    systemd.timers.undervolt = {
+    systemd.timers.undervolt = mkIf cfg.useTimer {
       description = "Undervolt timer to ensure voltage settings are always applied";
       partOf = [ "undervolt.service" ];
       wantedBy = [ "multi-user.target" ];