From cefd39de8ee95aa6c84784ca036cd91e06d5f658 Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 17 Apr 2024 11:08:49 +0200 Subject: [PATCH] refactor: use one max_percent instead of two seperate values, to allow quicker changing --- hosts/alice/tlp.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/alice/tlp.nix b/hosts/alice/tlp.nix index 9a31c6f..61d0e92 100644 --- a/hosts/alice/tlp.nix +++ b/hosts/alice/tlp.nix @@ -4,8 +4,10 @@ _: { enable = true; settings = let - start_charge = 40; - stop_charge = 60; + max_percent = 60; + + start_charge = 100 - max_percent; + stop_charge = max_percent; in { START_CHARGE_THRESH_BAT0 = start_charge; STOP_CHARGE_THRESH_BAT0 = stop_charge;