clightning-plugins/commando: add module
This commit is contained in:
parent
380ec3bb78
commit
0bede274a8
|
@ -66,6 +66,7 @@ NixOS modules ([src](modules/modules.nix))
|
||||||
* [clightning](https://github.com/ElementsProject/lightning) with support for announcing an onion service\
|
* [clightning](https://github.com/ElementsProject/lightning) with support for announcing an onion service\
|
||||||
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
|
||||||
|
* [commando](https://github.com/lightningd/plugins/tree/master/commando): control your node over lightning
|
||||||
* [helpme](https://github.com/lightningd/plugins/tree/master/helpme): walks you through setting up a fresh c-lightning node
|
* [helpme](https://github.com/lightningd/plugins/tree/master/helpme): walks you through setting up a fresh c-lightning node
|
||||||
* [monitor](https://github.com/renepickhardt/plugins/tree/master/monitor): helps you analyze the health of your peers and channels
|
* [monitor](https://github.com/renepickhardt/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
|
* [prometheus](https://github.com/lightningd/plugins/tree/master/prometheus): lightning node exporter for the prometheus timeseries server
|
||||||
|
|
37
modules/clightning-plugins/commando.nix
Normal file
37
modules/clightning-plugins/commando.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let cfg = config.services.clightning.plugins.commando; in
|
||||||
|
{
|
||||||
|
options.services.clightning.plugins.commando = {
|
||||||
|
enable = mkEnableOption "commando (clightning plugin)";
|
||||||
|
readers = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
|
example = [ "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518" ];
|
||||||
|
description = ''
|
||||||
|
IDs of nodes which can execute read-only commands (list*, get*, ...).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
writers = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
|
example = [ "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518" ];
|
||||||
|
description = ''
|
||||||
|
IDs of nodes which can execute any commands.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.clightning.extraConfig = ''
|
||||||
|
plugin=${config.nix-bitcoin.pkgs.clightning-plugins.commando.path}
|
||||||
|
''
|
||||||
|
+ concatMapStrings (reader: ''
|
||||||
|
commando_reader=${reader}
|
||||||
|
'') cfg.readers
|
||||||
|
+ concatMapStrings (writer: ''
|
||||||
|
commando_writer=${writer}
|
||||||
|
'') cfg.writers;
|
||||||
|
};
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ let
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./clboss.nix
|
./clboss.nix
|
||||||
|
./commando.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
./summary.nix
|
./summary.nix
|
||||||
./zmq.nix
|
./zmq.nix
|
||||||
|
|
|
@ -132,6 +132,11 @@ let
|
||||||
prometheus.enable = true;
|
prometheus.enable = true;
|
||||||
rebalance.enable = true;
|
rebalance.enable = true;
|
||||||
summary.enable = true;
|
summary.enable = true;
|
||||||
|
commando = {
|
||||||
|
enable = true;
|
||||||
|
readers = [ "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518" ];
|
||||||
|
writers = [ "0336efaa22b8ba77ae721a25d589e1c5f2486073dd2f041add32a23316150e8b62" ];
|
||||||
|
};
|
||||||
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