diff --git a/modules/clightning-plugins/clboss.nix b/modules/clightning-plugins/clboss.nix index 970a9cc..3a439b2 100644 --- a/modules/clightning-plugins/clboss.nix +++ b/modules/clightning-plugins/clboss.nix @@ -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 diff --git a/pkgs/clboss/default.nix b/pkgs/clboss/default.nix index ba6de16..0812876 100644 --- a/pkgs/clboss/default.nix +++ b/pkgs/clboss/default.nix @@ -5,11 +5,11 @@ let in stdenv.mkDerivation rec { pname = "clboss"; - version = "0.11B"; + version = "0.11E"; src = fetchurl { url = "https://github.com/ZmnSCPxj/clboss/releases/download/${version}/clboss-${version}.tar.gz"; - sha256 = "1ba4izgvq1qy3wfcnvs44pm0vi769h6i9ylbbnpxakxmwsd690xi"; + hash = "sha256-TDDD5tM3aNRxgSP/6rVM+4bX9zwcErZ0yQpQOjNU1FM="; }; nativeBuildInputs = [ pkgconfig libev curlWithGnuTLS sqlite ];