mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +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 = {
|
serviceConfig = {
|
||||||
RemainAfterExit = true;
|
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.";
|
description = "Set power limit of Intel CPUs with supported firmware. AC mode.";
|
||||||
partOf = [ "ac-power.target" ];
|
partOf = [ "ac-power.target" ];
|
||||||
enable = (cfg.powerLimit.enable || cfg.temperature.enable) && (generalCfg.cpuVendor == "intel");
|
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.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}"
|
+ optionalString (! isNull cfg.temperature.battery.cpu ) " --temp ${toString cfg.temperature.battery.cpu}"
|
||||||
;
|
;
|
||||||
|
unitConfig = {
|
||||||
|
ConditionACPower = false;
|
||||||
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
RemainAfterExit = true;
|
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.";
|
description = "Set power limit of Intel CPUs with supported firmware. Battery mode.";
|
||||||
partOf = [ "battery-power.target" ];
|
partOf = [ "battery-power.target" ];
|
||||||
enable = (cfg.powerLimit.enable || cfg.temperature.enable) && (generalCfg.cpuVendor == "intel");
|
enable = (cfg.powerLimit.enable || cfg.temperature.enable) && (generalCfg.cpuVendor == "intel");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue