Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit7d2a27df2cb27adcc0b24072eafbf35585a1a398 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-09-07 14:25:47 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-09-07 14:25:47 +0300
Filesaf09cf487ffdd1524f2f84af9f3e54a08e4daba6
nix-7d2a27df2cb27adcc0b24072eafbf35585a1a398.tar
nix-7d2a27df2cb27adcc0b24072eafbf35585a1a398.tar.gz
nix-7d2a27df2cb27adcc0b24072eafbf35585a1a398.zip
Parent203e8e7d1c41b96880dd406cc9ce202238147cdd (diff)
feat(juno): Added battery drain service (disabled by default)
1 files changed, 18 insertions, 0 deletions
-rw-r--r--machines/juno/configuration.nix18
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 = [