From 23644cbfd596dfec0d7b8aa58ad5ce98736045ef Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Fri, 22 Nov 2024 12:53:47 -0800 Subject: Add tlp @ginaz --- hosts/common/optional/services/tlp.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hosts/common/optional/services/tlp.nix b/hosts/common/optional/services/tlp.nix index 967f197..6eb0b82 100644 --- a/hosts/common/optional/services/tlp.nix +++ b/hosts/common/optional/services/tlp.nix @@ -1,9 +1,21 @@ +{config, lib, ...}: { - services.tlp = { - enable = true; - settings = { - START_CHARGE_THRESH_BAT0 = 40; - STOP_CHARGE_THRESH_BAT0 = 50; + services.tlp.enable = true; + + lib.mkIf ((builtins.match "^(jupiter|neptune|saturn|uranus)$" config.networking.hostName) != null) { + services.tlp = { + settings = { + START_CHARGE_THRESH_BAT0 = 40; + STOP_CHARGE_THRESH_BAT0 = 50; + }; + }; + }; + + lib.mkIf (config.networking.hostName == "ginaz") { + services.tlp = { + settings = { + STOP_CHARGE_THRESH_BAT0 = 1; + }; }; }; } -- cgit v1.2.3