From 31af0df05bdd7c331807184c5203ef0d952cac88 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 25 Jul 2022 18:21:33 -0700 Subject: [PATCH 1/2] clightning-plugins: bump Signed-off-by: William Casarin --- pkgs/clightning-plugins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/clightning-plugins/default.nix b/pkgs/clightning-plugins/default.nix index 9a85a96..3013f9a 100644 --- a/pkgs/clightning-plugins/default.nix +++ b/pkgs/clightning-plugins/default.nix @@ -6,8 +6,8 @@ let src = pkgs.fetchFromGitHub { owner = "lightningd"; repo = "plugins"; - rev = "7ef9e6c172c0bd0dd09168e19b29e44f7ec6ec4d"; - sha256 = "12llf4dnyria0s1x4bmm360d6bxk47z0wyxwwlmq3762mdfl36js"; + rev = "59bad754cb338872c622ad716e8ed0063edf4052"; + sha256 = "19nnmv2jvb0xmcha79dij399avasn2x521n9qg11lqj8xnzadm6a"; }; version = builtins.substring 0 7 src.rev; From e3c54aa64e8167b7baf4fd89511d74ba8157c921 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 25 Jul 2022 17:08:01 -0700 Subject: [PATCH 2/2] clightning: add currencyrate plugin Add the currencyrate plugin. This is used by other plugins to fetch currency rates. This can be used for setting fiat amounts in bolt12 invoices. Signed-off-by: William Casarin --- README.md | 1 + modules/clightning-plugins/default.nix | 2 ++ pkgs/clightning-plugins/default.nix | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 07b70fe..75f911f 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ NixOS modules ([src](modules/modules.nix)) 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 * [prometheus](https://github.com/lightningd/plugins/tree/master/prometheus): lightning node exporter for the prometheus timeseries server diff --git a/modules/clightning-plugins/default.nix b/modules/clightning-plugins/default.nix index 36f2937..b31352a 100644 --- a/modules/clightning-plugins/default.nix +++ b/modules/clightning-plugins/default.nix @@ -3,6 +3,7 @@ with lib; let options.services.clightning.plugins = { + currencyrate.enable = mkEnableOption "Currencyrate (clightning plugin)"; helpme.enable = mkEnableOption "Help me (clightning plugin)"; monitor.enable = mkEnableOption "Monitor (clightning plugin)"; rebalance.enable = mkEnableOption "Rebalance (clightning plugin)"; @@ -24,6 +25,7 @@ in { config = { services.clightning.extraConfig = mkMerge [ + (mkIf cfg.currencyrate.enable "plugin=${pluginPkgs.currencyrate.path}") (mkIf cfg.helpme.enable "plugin=${pluginPkgs.helpme.path}") (mkIf cfg.monitor.enable "plugin=${pluginPkgs.monitor.path}") (mkIf cfg.rebalance.enable "plugin=${pluginPkgs.rebalance.path}") diff --git a/pkgs/clightning-plugins/default.nix b/pkgs/clightning-plugins/default.nix index 3013f9a..c7c41e0 100644 --- a/pkgs/clightning-plugins/default.nix +++ b/pkgs/clightning-plugins/default.nix @@ -17,6 +17,10 @@ let description = "Enable RPC over lightning"; extraPkgs = [ nbPython3Packages.runes ]; }; + currencyrate = { + description = "Currency rate fetcher and converter"; + extraPkgs = [ requests cachetools ]; + }; feeadjuster = { description = "Dynamically changes channel fees to keep your channels more balanced"; };