From 3b4cf665e823908c6820dcab7960800c129082b2 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 25 Apr 2022 11:18:57 +0200 Subject: [PATCH 1/2] clboss: 0.11B -> 0.11E --- pkgs/clboss/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ]; From f08b83bce2d3ee71de3a68bc3335f0e7c075af6b Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 25 Apr 2022 11:19:10 +0200 Subject: [PATCH 2/2] clboss: update module --- modules/clightning-plugins/clboss.nix | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) 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