diff options
Diffstat (limited to 'hosts/vidhar')
-rw-r--r-- | hosts/vidhar/default.nix | 12 |
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; |