summaryrefslogtreecommitdiff
path: root/hosts/vidhar/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2024-08-18 23:53:17 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2024-08-18 23:53:17 +0200
commitf4fb1e159c422fbc966bf6631b907036304699d0 (patch)
tree436ef7c3a22e3f441c7fa5d6a343098f083c6cc9 /hosts/vidhar/default.nix
parentdec3e215aeedcb91e3ad03def5e45a6a8e572a1e (diff)
downloadnixos-f4fb1e159c422fbc966bf6631b907036304699d0.tar
nixos-f4fb1e159c422fbc966bf6631b907036304699d0.tar.gz
nixos-f4fb1e159c422fbc966bf6631b907036304699d0.tar.bz2
nixos-f4fb1e159c422fbc966bf6631b907036304699d0.tar.xz
nixos-f4fb1e159c422fbc966bf6631b907036304699d0.zip
...
Diffstat (limited to 'hosts/vidhar/default.nix')
-rw-r--r--hosts/vidhar/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index 440829bb..78f305f8 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -132,6 +132,18 @@ with lib;
132 CPUQuota = "2000%"; 132 CPUQuota = "2000%";
133 }; 133 };
134 }; 134 };
135 systemd.services."limit-pstate" = {
136 wantedBy = ["basic.target"];
137 serviceConfig = {
138 ExecStart = pkgs.writeShellScript "limit-pstate-start" ''
139 echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
140 '';
141 RemainAfterExit = true;
142 ExecStop = pkgs.writeShellScript "limit-pstate-stop" ''
143 echo 100 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
144 '';
145 };
146 };
135 147
136 powerManagement = { 148 powerManagement = {
137 enable = true; 149 enable = true;