mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-10-05 19:57:27 +03:00
Merge fort-nix/nix-bitcoin#689: Update clightning plugins and remove unmaintained plugins
5730afe48e
obsolete-options: add removed clightning plugins (Erik Arvstedt)aec25c7d04
clightning-plugins: update (Jonas Nick)b27078efa5
clightning-plugins: remove unmaintained summary plugin (Jonas Nick)24bc983363
clightning-plugins: remove unmaintained plugins prometheus & helpme (Jonas Nick) Pull request description: ACKs for top commit: erikarvstedt: ACK5730afe48e
Tree-SHA512: 2f8e5552a680fb80792fb595587af4c848513c69d7290494ab7133e2b50c341b2d055fc24f598dc82e222c892697c37be7895cc7e9da67f6d2bba024af6e09c0
This commit is contained in:
commit
fcb7dc4ff8
@ -74,11 +74,8 @@ NixOS modules ([src](modules/modules.nix))
|
|||||||
Available plugins:
|
Available plugins:
|
||||||
* [clboss](https://github.com/ZmnSCPxj/clboss): automated C-Lightning Node Manager
|
* [clboss](https://github.com/ZmnSCPxj/clboss): automated C-Lightning Node Manager
|
||||||
* [currencyrate](https://github.com/lightningd/plugins/tree/master/currencyrate): currency converter
|
* [currencyrate](https://github.com/lightningd/plugins/tree/master/currencyrate): currency converter
|
||||||
* [helpme](https://github.com/lightningd/plugins/tree/master/helpme): walks you through setting up a fresh c-lightning node
|
|
||||||
* [monitor](https://github.com/lightningd/plugins/tree/master/monitor): helps you analyze the health of your peers and channels
|
* [monitor](https://github.com/lightningd/plugins/tree/master/monitor): helps you analyze the health of your peers and channels
|
||||||
* [prometheus](https://github.com/lightningd/plugins/tree/master/prometheus): lightning node exporter for the prometheus timeseries server
|
|
||||||
* [rebalance](https://github.com/lightningd/plugins/tree/master/rebalance): keeps your channels balanced
|
* [rebalance](https://github.com/lightningd/plugins/tree/master/rebalance): keeps your channels balanced
|
||||||
* [summary](https://github.com/lightningd/plugins/tree/master/summary): print a nice summary of the node status
|
|
||||||
* [trustedcoin](https://github.com/nbd-wtf/trustedcoin) ([experimental](docs/services.md#trustedcoin)): replaces bitcoind with trusted public explorers
|
* [trustedcoin](https://github.com/nbd-wtf/trustedcoin) ([experimental](docs/services.md#trustedcoin)): replaces bitcoind with trusted public explorers
|
||||||
* [zmq](https://github.com/lightningd/plugins/tree/master/zmq): publishes notifications via ZeroMQ to configured endpoints
|
* [zmq](https://github.com/lightningd/plugins/tree/master/zmq): publishes notifications via ZeroMQ to configured endpoints
|
||||||
* [clightning-rest](https://github.com/Ride-The-Lightning/c-lightning-REST): REST server for clightning
|
* [clightning-rest](https://github.com/Ride-The-Lightning/c-lightning-REST): REST server for clightning
|
||||||
|
@ -571,13 +571,13 @@ You can activate and configure these plugins like so:
|
|||||||
services.clightning = {
|
services.clightning = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = {
|
plugins = {
|
||||||
prometheus.enable = true;
|
clboss.enable = true;
|
||||||
prometheus.listen = "0.0.0.0:9900";
|
clboss.min-onchain = 40000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Please have a look at the module for a plugin (e.g. [prometheus.nix](../modules/clightning-plugins/prometheus.nix)) to learn its configuration options.
|
Please have a look at the module for a plugin (e.g. [clboss.nix](../modules/clightning-plugins/clboss.nix)) to learn its configuration options.
|
||||||
|
|
||||||
### Trustedcoin
|
### Trustedcoin
|
||||||
When `services.clightning.tor.proxy` is enabled, [trustedcoin](https://github.com/nbd-wtf/trustedcoin)
|
When `services.clightning.tor.proxy` is enabled, [trustedcoin](https://github.com/nbd-wtf/trustedcoin)
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#
|
#
|
||||||
# == Plugins
|
# == Plugins
|
||||||
# See ../README.md (Features → clightning) for the list of available plugins.
|
# See ../README.md (Features → clightning) for the list of available plugins.
|
||||||
# services.clightning.plugins.prometheus.enable = true;
|
# services.clightning.plugins.clboss.enable = true;
|
||||||
#
|
#
|
||||||
# == REST server
|
# == REST server
|
||||||
# Set this to create a clightning REST onion service.
|
# Set this to create a clightning REST onion service.
|
||||||
|
@ -4,7 +4,6 @@ with lib;
|
|||||||
let
|
let
|
||||||
options.services.clightning.plugins = {
|
options.services.clightning.plugins = {
|
||||||
currencyrate.enable = mkEnableOption "Currencyrate (clightning plugin)";
|
currencyrate.enable = mkEnableOption "Currencyrate (clightning plugin)";
|
||||||
helpme.enable = mkEnableOption "Help me (clightning plugin)";
|
|
||||||
monitor.enable = mkEnableOption "Monitor (clightning plugin)";
|
monitor.enable = mkEnableOption "Monitor (clightning plugin)";
|
||||||
rebalance.enable = mkEnableOption "Rebalance (clightning plugin)";
|
rebalance.enable = mkEnableOption "Rebalance (clightning plugin)";
|
||||||
};
|
};
|
||||||
@ -15,8 +14,6 @@ in {
|
|||||||
imports = [
|
imports = [
|
||||||
./clboss.nix
|
./clboss.nix
|
||||||
./feeadjuster.nix
|
./feeadjuster.nix
|
||||||
./prometheus.nix
|
|
||||||
./summary.nix
|
|
||||||
./trustedcoin.nix
|
./trustedcoin.nix
|
||||||
./zmq.nix
|
./zmq.nix
|
||||||
];
|
];
|
||||||
@ -26,7 +23,6 @@ in {
|
|||||||
config = {
|
config = {
|
||||||
services.clightning.extraConfig = mkMerge [
|
services.clightning.extraConfig = mkMerge [
|
||||||
(mkIf cfg.currencyrate.enable "plugin=${pluginPkgs.currencyrate.path}")
|
(mkIf cfg.currencyrate.enable "plugin=${pluginPkgs.currencyrate.path}")
|
||||||
(mkIf cfg.helpme.enable "plugin=${pluginPkgs.helpme.path}")
|
|
||||||
(mkIf cfg.monitor.enable "plugin=${pluginPkgs.monitor.path}")
|
(mkIf cfg.monitor.enable "plugin=${pluginPkgs.monitor.path}")
|
||||||
(mkIf cfg.rebalance.enable "plugin=${pluginPkgs.rebalance.path}")
|
(mkIf cfg.rebalance.enable "plugin=${pluginPkgs.rebalance.path}")
|
||||||
];
|
];
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let cfg = config.services.clightning.plugins.prometheus; in
|
|
||||||
{
|
|
||||||
options.services.clightning.plugins.prometheus = {
|
|
||||||
enable = mkEnableOption "Prometheus (clightning plugin)";
|
|
||||||
listen = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "0.0.0.0:9750";
|
|
||||||
description = "Address and port to bind to.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.clightning.extraConfig = ''
|
|
||||||
plugin=${config.nix-bitcoin.pkgs.clightning-plugins.prometheus.path}
|
|
||||||
prometheus-listen=${cfg.listen}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let cfg = config.services.clightning.plugins.summary; in
|
|
||||||
{
|
|
||||||
options.services.clightning.plugins.summary = {
|
|
||||||
enable = mkEnableOption "Summary (clightning plugin)";
|
|
||||||
currency = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "USD";
|
|
||||||
description = mdDoc "The currency to look up on btcaverage.";
|
|
||||||
};
|
|
||||||
currencyPrefix = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "USD $";
|
|
||||||
description = mdDoc "The prefix to use for the currency.";
|
|
||||||
};
|
|
||||||
availabilityInterval = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 300;
|
|
||||||
description = mdDoc "How often in seconds the availability should be calculated.";
|
|
||||||
};
|
|
||||||
availabilityWindow = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 72;
|
|
||||||
description = mdDoc "How many hours the availability should be averaged over.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.clightning.extraConfig = ''
|
|
||||||
plugin=${config.nix-bitcoin.pkgs.clightning-plugins.summary.path}
|
|
||||||
summary-currency="${cfg.currency}"
|
|
||||||
summary-currency-prefix="${cfg.currencyPrefix}"
|
|
||||||
summary-availability-interval=${toString cfg.availabilityInterval}
|
|
||||||
summary-availability-window=${toString cfg.availabilityWindow}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
@ -107,7 +107,15 @@ in {
|
|||||||
(mkRemovedOptionModule [ "services" "clightning" "plugins" "clboss" "acknowledgeDeprecation" ] ''
|
(mkRemovedOptionModule [ "services" "clightning" "plugins" "clboss" "acknowledgeDeprecation" ] ''
|
||||||
`clboss` is maintained again and has been un-deprecated.
|
`clboss` is maintained again and has been un-deprecated.
|
||||||
'')
|
'')
|
||||||
];
|
]
|
||||||
|
++
|
||||||
|
# 0.0.106
|
||||||
|
(map (plugin:
|
||||||
|
mkRemovedOptionModule [ "services" "clightning" "plugins" plugin ] ''
|
||||||
|
This plugin is no longer maintained.
|
||||||
|
'')
|
||||||
|
[ "summary" "helpme" "prometheus" ]
|
||||||
|
);
|
||||||
config = {
|
config = {
|
||||||
# Migrate old clightning-rest datadir from nix-bitcoin versions < 0.0.70
|
# Migrate old clightning-rest datadir from nix-bitcoin versions < 0.0.70
|
||||||
systemd.services.clightning-rest-migrate-datadir = let
|
systemd.services.clightning-rest-migrate-datadir = let
|
||||||
|
@ -6,8 +6,8 @@ let
|
|||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "lightningd";
|
owner = "lightningd";
|
||||||
repo = "plugins";
|
repo = "plugins";
|
||||||
rev = "ce078bb74e10b5dea779fcd9fbe77e1d3e72db7a";
|
rev = "83a80d134ecb2adc6647235d56195332e846f5cb";
|
||||||
hash = "sha256-SCHSJzXe1l14hVT47SU3lWDxKCKwwICjXjSDpjUX96U";
|
sha256 = "1vwsvrak2jkcdfcaj426z4qk8shpkqhrqlfnb9i43w24ry7sqzy1";
|
||||||
};
|
};
|
||||||
|
|
||||||
version = builtins.substring 0 7 src.rev;
|
version = builtins.substring 0 7 src.rev;
|
||||||
@ -20,27 +20,13 @@ let
|
|||||||
feeadjuster = {
|
feeadjuster = {
|
||||||
description = "Dynamically changes channel fees to keep your channels more balanced";
|
description = "Dynamically changes channel fees to keep your channels more balanced";
|
||||||
};
|
};
|
||||||
helpme = {
|
|
||||||
description = "Walks you through setting up a c-lightning node, offering advice for common problems";
|
|
||||||
};
|
|
||||||
monitor = {
|
monitor = {
|
||||||
description = "Helps you analyze the health of your peers and channels";
|
description = "Helps you analyze the health of your peers and channels";
|
||||||
extraPkgs = [ packaging ];
|
extraPkgs = [ packaging ];
|
||||||
};
|
};
|
||||||
prometheus = {
|
|
||||||
description = "Lightning node exporter for the prometheus timeseries server";
|
|
||||||
extraPkgs = [ prometheus_client ];
|
|
||||||
patchRequirements =
|
|
||||||
"--replace prometheus-client==0.6.0 prometheus-client==0.17.1"
|
|
||||||
+ " --replace pyln-client~=0.9.3 pyln-client~=24.02";
|
|
||||||
};
|
|
||||||
rebalance = {
|
rebalance = {
|
||||||
description = "Keeps your channels balanced";
|
description = "Keeps your channels balanced";
|
||||||
};
|
};
|
||||||
summary = {
|
|
||||||
description = "Prints a summary of the node status";
|
|
||||||
extraPkgs = [ packaging requests ];
|
|
||||||
};
|
|
||||||
zmq = {
|
zmq = {
|
||||||
description = "Publishes notifications via ZeroMQ to configured endpoints";
|
description = "Publishes notifications via ZeroMQ to configured endpoints";
|
||||||
scriptName = "cl-zmq";
|
scriptName = "cl-zmq";
|
||||||
|
@ -49,6 +49,9 @@ let
|
|||||||
removed = [
|
removed = [
|
||||||
# Only defined via `obsolete-options.nix`
|
# Only defined via `obsolete-options.nix`
|
||||||
"commando"
|
"commando"
|
||||||
|
"helpme"
|
||||||
|
"prometheus"
|
||||||
|
"summary"
|
||||||
];
|
];
|
||||||
available = subtractLists removed (builtins.attrNames plugins);
|
available = subtractLists removed (builtins.attrNames plugins);
|
||||||
enabled = builtins.filter (plugin: plugins.${plugin}.enable) available;
|
enabled = builtins.filter (plugin: plugins.${plugin}.enable) available;
|
||||||
@ -152,11 +155,8 @@ let
|
|||||||
services.clightning.plugins = {
|
services.clightning.plugins = {
|
||||||
clboss.enable = true;
|
clboss.enable = true;
|
||||||
feeadjuster.enable = true;
|
feeadjuster.enable = true;
|
||||||
helpme.enable = true;
|
|
||||||
monitor.enable = true;
|
monitor.enable = true;
|
||||||
prometheus.enable = true;
|
|
||||||
rebalance.enable = true;
|
rebalance.enable = true;
|
||||||
summary.enable = true;
|
|
||||||
zmq = let tcpEndpoint = "tcp://127.0.0.1:5501"; in {
|
zmq = let tcpEndpoint = "tcp://127.0.0.1:5501"; in {
|
||||||
enable = true;
|
enable = true;
|
||||||
channel-opened = tcpEndpoint;
|
channel-opened = tcpEndpoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user