clightning-plugins: remove commando pkg and module

clightning 0.12.0 ships with a reimplementation of the commando plugin that is
incompatible with the commando module that existed in nix-bitcoin.
This commit is contained in:
Jonas Nick 2022-09-03 21:15:50 +00:00
parent 33144262ec
commit 623c238b16
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
6 changed files with 18 additions and 49 deletions

View File

@ -71,7 +71,6 @@ NixOS modules ([src](modules/modules.nix))
and [database replication](docs/services.md#setup-clightning-database-replication).\
Available plugins:
* [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
* [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

View File

@ -1,37 +0,0 @@
{ 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;
};
}

View File

@ -14,7 +14,6 @@ let
in {
imports = [
./clboss.nix
./commando.nix
./feeadjuster.nix
./prometheus.nix
./summary.nix

View File

@ -61,6 +61,21 @@ in {
"btcpayserver"
"rtl"
"electrs"
]) ++
# 0.0.77
(
let
optionName = [ "services" "clightning" "plugins" "commando" ];
in [
(mkRemovedOptionModule (optionName ++ [ "enable" ]) ''
clightning 0.12.0 ships with a reimplementation of the commando plugin
that is incompatible with the commando module that existed in
nix-bitcoin. The new built-in commando plugin is always enabled. For
information on how to use it, run `lightning-cli help commando` and
`lightning-cli help commando-rune`.
'')
(mkRemovedOptionModule (optionName ++ [ "readers" ]) "")
(mkRemovedOptionModule (optionName ++ [ "writers" ]) "")
]);
config = {

View File

@ -13,10 +13,6 @@ let
version = builtins.substring 0 7 src.rev;
plugins = with nbPython3Packages; {
commando = {
description = "Enable RPC over lightning";
extraPkgs = [ nbPython3Packages.runes ];
};
currencyrate = {
description = "Currency rate fetcher and converter";
extraPkgs = [ requests cachetools ];

View File

@ -56,7 +56,9 @@ let
services.clightning.extraConfig = mkIf config.test.noConnections "disable-dns";
test.data.clightning-plugins = let
plugins = config.services.clightning.plugins;
enabled = builtins.filter (plugin: plugins.${plugin}.enable) (builtins.attrNames plugins);
removed = [ "commando" ];
enabled = builtins.filter (plugin: plugins.${plugin}.enable)
(subtractLists removed (builtins.attrNames plugins));
nbPkgs = config.nix-bitcoin.pkgs;
pluginPkgs = nbPkgs.clightning-plugins // {
clboss.path = "${nbPkgs.clboss}/bin/clboss";
@ -158,11 +160,6 @@ let
prometheus.enable = true;
rebalance.enable = true;
summary.enable = true;
commando = {
enable = true;
readers = [ "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518" ];
writers = [ "0336efaa22b8ba77ae721a25d589e1c5f2486073dd2f041add32a23316150e8b62" ];
};
zmq = let tcpEndpoint = "tcp://127.0.0.1:5501"; in {
enable = true;
channel-opened = tcpEndpoint;