mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
cpufreq: Don't fail if the CPU doesn't support frequency setting
This commit is contained in:
parent
685ca50650
commit
f5cd4eef11
1 changed files with 2 additions and 3 deletions
|
@ -41,13 +41,12 @@ in
|
||||||
after = [ "systemd-modules-load.service" ];
|
after = [ "systemd-modules-load.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [ cpupower ];
|
path = [ cpupower ];
|
||||||
script = ''
|
|
||||||
cpupower frequency-set -g ${cfg.cpuFreqGovernor}
|
|
||||||
'';
|
|
||||||
unitConfig.ConditionVirtualization = false;
|
unitConfig.ConditionVirtualization = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = "yes";
|
RemainAfterExit = "yes";
|
||||||
|
ExecStart = "${cpupower}/bin/cpupower frequency-set -g ${cfg.cpuFreqGovernor}";
|
||||||
|
SuccessExitStatus = "0 237";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue