Merge fort-nix/nix-bitcoin#445: clightning-plugins: add commando plugin
ee4cdb0586pyln-proto: relax pycparser constraint (William Casarin)2d6c4e829ereadme: fix monitor c-lightning plugin link (William Casarin)0bede274a8clightning-plugins/commando: add module (Erik Arvstedt)380ec3bb78clightning-plugins: add commando (William Casarin)80312ba9d7python-packages/sha256: init at 0.1 (William Casarin)71eccb73d6python-packages/runes: init at 0.4.0 (William Casarin)570e271695clightning-plugins: bump to latest git (William Casarin) Pull request description: ACKs for top commit: erikarvstedt: ACKee4cdb0586Tree-SHA512: 2db97ee758f061ce72f8e049299c453cc4e9947d9af55c68745aa15bcd9529cb47defb52366ca216249441fb8e113c3b3b048a5381f41fd1ef80e677dae0fe37
This commit is contained in:
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 {
|
||||
imports = [
|
||||
./clboss.nix
|
||||
./commando.nix
|
||||
./prometheus.nix
|
||||
./summary.nix
|
||||
./zmq.nix
|
||||
|
||||
Reference in New Issue
Block a user