diff options
author | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
commit | 29d72c898d674d2c18fc0f4a76b5e623de0c3dfe (patch) | |
tree | fc4b0695c986a1cda6f1fbbbcbe716e203c54fa3 /krebs/3modules/power-action.nix | |
parent | e157ffa72856e4378aa23b096b2efff233f3cb3d (diff) | |
parent | 083229d0211096daec08673f743ccc45b1d8a0ac (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/power-action.nix')
-rw-r--r-- | krebs/3modules/power-action.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/krebs/3modules/power-action.nix b/krebs/3modules/power-action.nix index 71e2b541a..a9ed24d3f 100644 --- a/krebs/3modules/power-action.nix +++ b/krebs/3modules/power-action.nix @@ -60,7 +60,7 @@ let }; }; - startScript = pkgs.writeDash "power-action" '' + startScript = pkgs.writers.writeDash "power-action" '' set -euf power="$(${powerlvl})" @@ -77,11 +77,11 @@ let writeRule = _: plan: "if [ $power -ge ${toString plan.lowerLimit} ] && [ $power -le ${toString plan.upperLimit} ] ${charging_check plan}; then ${plan.action}; fi"; - powerlvl = pkgs.writeDash "powerlvl" '' + powerlvl = pkgs.writers.writeDash "powerlvl" '' cat /sys/class/power_supply/${cfg.battery}/capacity ''; - state = pkgs.writeDash "state" '' + state = pkgs.writers.writeDash "state" '' if [ "$(cat /sys/class/power_supply/${cfg.battery}/status)" = "Discharging" ] then echo "false" else echo "true" |