diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-28 19:13:04 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-28 19:13:04 +0200 |
commit | f5cd4eef1136c617ef66e40191e1333261102bc5 (patch) | |
tree | fa22af47ffa94b5b43e1e73a9b07e8525c8f7516 /nixos/modules/tasks/cpu-freq.nix | |
parent | 685ca50650a466a32358db32c846aa0b452b27bf (diff) | |
download | nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar.gz nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar.bz2 nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar.lz nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar.xz nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.tar.zst nixlib-f5cd4eef1136c617ef66e40191e1333261102bc5.zip |
cpufreq: Don't fail if the CPU doesn't support frequency setting
Diffstat (limited to 'nixos/modules/tasks/cpu-freq.nix')
-rw-r--r-- | nixos/modules/tasks/cpu-freq.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/tasks/cpu-freq.nix b/nixos/modules/tasks/cpu-freq.nix index eb1dfe5f6be2..a8c63c134287 100644 --- a/nixos/modules/tasks/cpu-freq.nix +++ b/nixos/modules/tasks/cpu-freq.nix @@ -41,13 +41,12 @@ in after = [ "systemd-modules-load.service" ]; wantedBy = [ "multi-user.target" ]; path = [ cpupower ]; - script = '' - cpupower frequency-set -g ${cfg.cpuFreqGovernor} - ''; unitConfig.ConditionVirtualization = false; serviceConfig = { Type = "oneshot"; RemainAfterExit = "yes"; + ExecStart = "${cpupower}/bin/cpupower frequency-set -g ${cfg.cpuFreqGovernor}"; + SuccessExitStatus = "0 237"; }; }; |