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,7 +108,8 @@ in
|
||||||
systemd.services.set_battery_threshold = {
|
systemd.services.set_battery_threshold = {
|
||||||
enable = true;
|
enable = true;
|
||||||
script = ''
|
script = ''
|
||||||
echo 90 | tee /sys/class/power_supply/BAT*/charge_control_end_threshold > /dev/null
|
ls /sys/class/power_supply/BAT* || exit 0
|
||||||
|
echo 90 | tee /sys/class/power_supply/BAT*/charge_control_end_threshold > /dev/null
|
||||||
'';
|
'';
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue