servo: clightning: rebalance channels in the background, always

This commit is contained in:
2025-01-11 10:56:32 +00:00
parent cdbb128fbe
commit b228ea123d

View File

@@ -207,6 +207,21 @@ in
''; '';
}; };
systemd.services.clightning-autobalance = {
description = "shuffle funds around to improve routability (in a no-cost manner)";
after = [ "clightning.service" ];
bindsTo = [ "clightning.service" ];
wantedBy = [ "clightning.service" ];
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "600";
serviceConfig.ExecStart = "${lib.getExe pkgs.clightning-sane} autobalance";
serviceConfig.Type = "simple";
serviceConfig.User = cfg.user;
# TODO: sandbox (just follow what i do for clightning-sane)
};
users.users.${cfg.user} = { users.users.${cfg.user} = {
isSystemUser = true; isSystemUser = true;
group = cfg.group; group = cfg.group;