clboss: update module

This commit is contained in:
Erik Arvstedt 2022-04-25 11:19:10 +02:00
parent 3b4cf665e8
commit f08b83bce2
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -4,7 +4,14 @@ with lib;
let cfg = config.services.clightning.plugins.clboss; in
{
options.services.clightning.plugins.clboss = {
enable = mkEnableOption "CLBOSS (clightning plugin)";
enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable CLBOSS (clightning plugin).
See also: https://github.com/ZmnSCPxj/clboss#operating
'';
};
min-onchain = mkOption {
type = types.ints.positive;
default = 30000;
@ -14,6 +21,25 @@ let cfg = config.services.clightning.plugins.clboss; in
the funds in your clightning wallet.
'';
};
min-channel = mkOption {
type = types.ints.positive;
default = 500000;
description = "The minimum size (in satoshi) of channels created by CLBOSS.";
};
max-channel = mkOption {
type = types.ints.positive;
default = 16777215;
description = "The maximum size (in satoshi) of channels created by CLBOSS.";
};
zerobasefee = mkOption {
type = types.enum [ "require" "allow" "disallow" ];
default = "allow";
description = ''
require: set `base_fee` to 0.
allow: set `base_fee` according to the CLBOSS heuristics, which may include value 0.
disallow: set `base_fee` to according to the CLBOSS heuristics, with a minimum value of 1.
'';
};
package = mkOption {
type = types.package;
default = config.nix-bitcoin.pkgs.clboss;
@ -26,6 +52,9 @@ let cfg = config.services.clightning.plugins.clboss; in
services.clightning.extraConfig = ''
plugin=${cfg.package}/bin/clboss
clboss-min-onchain=${toString cfg.min-onchain}
clboss-min-channel=${toString cfg.min-channel}
clboss-max-channel=${toString cfg.max-channel}
clboss-zerobasefee=${cfg.zerobasefee}
'';
systemd.services.clightning.path = [
pkgs.dnsutils