-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clightning: add TEoS watchtower plugin
- Loading branch information
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ in { | |
./feeadjuster.nix | ||
./prometheus.nix | ||
./summary.nix | ||
./teos-watchtower-plugin.nix | ||
./zmq.nix | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ config, lib, ... }: | ||
|
||
with lib; | ||
let cfg = config.services.clightning.plugins.teos-watchtower-plugin; in | ||
{ | ||
options.services.clightning.plugins.teos-watchtower-plugin = { | ||
enable = mkEnableOption "TEoS - watchtower (clightning plugin)"; | ||
package = mkOption { | ||
type = types.package; | ||
default = config.nix-bitcoin.pkgs.teos.teos-watchtower-plugin; | ||
defaultText = "config.nix-bitcoin.pkgs.teos.teos-watchtower-plugin"; | ||
description = "The package providing TEoS watchtower plugin binaries."; | ||
}; | ||
port = mkOption { | ||
type = types.int; | ||
default = config.services.teos.apiPort; | ||
description = "tower API port."; | ||
}; | ||
watchtowerMaxRetryTime = mkOption { | ||
type = types.int; | ||
default = 900; | ||
description = "the maximum time a retry strategy will try to reach a temporary unreachable tower before giving up."; | ||
}; | ||
watchtowerProxy = mkOption { | ||
type = types.str; | ||
default = ""; | ||
description = "Socks v5 proxy IP address and port for the watchtower client"; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
services.clightning.extraConfig = '' | ||
plugin=${cfg.package}/bin/watchtower-client | ||
watchtower-port=${toString cfg.port} | ||
watchtower-max-retry-time=${toString cfg.watchtowerMaxRetryTime} | ||
watchtower-proxy="${cfg.watchtowerProxy}" | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters