mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Power] Fix battery and ac power targets
This commit is contained in:
parent
8ed4a576e2
commit
d28784953c
1 changed files with 5 additions and 2 deletions
|
|
@ -145,7 +145,7 @@ in {
|
|||
serviceConfig = {
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" "ac-power.target" ];
|
||||
wantedBy = [ "ac-power.target" ];
|
||||
description = "Set power limit of Intel CPUs with supported firmware. AC mode.";
|
||||
partOf = [ "ac-power.target" ];
|
||||
enable = (cfg.powerLimit.enable || cfg.temperature.enable) && (generalCfg.cpuVendor == "intel");
|
||||
|
|
@ -157,10 +157,13 @@ in {
|
|||
+ optionalString (! isNull cfg.powerLimit.battery.cpuBoost ) " --power-limit-short ${toString cfg.powerLimit.battery.cpuBoost} 0.1"
|
||||
+ optionalString (! isNull cfg.temperature.battery.cpu ) " --temp ${toString cfg.temperature.battery.cpu}"
|
||||
;
|
||||
unitConfig = {
|
||||
ConditionACPower = false;
|
||||
};
|
||||
serviceConfig = {
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" "battery-power.target" ];
|
||||
wantedBy = [ "battery-power.target" ];
|
||||
description = "Set power limit of Intel CPUs with supported firmware. Battery mode.";
|
||||
partOf = [ "battery-power.target" ];
|
||||
enable = (cfg.powerLimit.enable || cfg.temperature.enable) && (generalCfg.cpuVendor == "intel");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue