diff options
1 files changed, 18 insertions, 0 deletions
| -rw-r--r-- | machines/juno/configuration.nix | 18 |
diff --git a/machines/juno/configuration.nix b/machines/juno/configuration.nix index 9e75d45..3799892 100644 --- a/machines/juno/configuration.nix +++ b/machines/juno/configuration.nix @@ -3,6 +3,24 @@ thinkfan xorg.xf86inputsynaptics ]; + # External third-party battery is no longer able to hold 100% charge without getting "stuck" + # Often this would result in an immediate shutdown, since there would be either a short or voltage surge + # My guess is the problem lies with the controller + # I've twice been able to rejuvenate it by just retrying and retrying to discharge it + # So, this service is here, if that happens again, it should be enabled and then on every bootup when charger is connected + # it will try to discharge battery, which will result in shutdown. + systemd.services.extdrain = { + enable = false; + wantedBy = [ "multi-user.target" ]; + unitConfig = { + Type = "simple"; + }; + path = [ pkgs.tlp ]; + serviceConfig = { + ExecStart = "${pkgs.tlp}/bin/tlp discharge BAT1"; + }; + }; + services.thinkfan = { enable = true; levels = [ |
