services.set_battery_threshold: dont run without battery
This commit is contained in:
parent
dcae161f30
commit
f9aa497de8
1 changed files with 2 additions and 1 deletions
|
@ -108,6 +108,7 @@ in
|
||||||
systemd.services.set_battery_threshold = {
|
systemd.services.set_battery_threshold = {
|
||||||
enable = true;
|
enable = true;
|
||||||
script = ''
|
script = ''
|
||||||
|
ls /sys/class/power_supply/BAT* || exit 0
|
||||||
echo 90 | tee /sys/class/power_supply/BAT*/charge_control_end_threshold > /dev/null
|
echo 90 | tee /sys/class/power_supply/BAT*/charge_control_end_threshold > /dev/null
|
||||||
'';
|
'';
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
|
|
Loading…
Add table
Reference in a new issue