From cf10fbb74fef6eb5929704f17495773af658642b Mon Sep 17 00:00:00 2001 From: neverupdate Date: Sat, 27 Aug 2022 01:15:06 -0300 Subject: [PATCH] trustedcoin: add module --- modules/clightning-plugins/trustedcoin.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/clightning-plugins/trustedcoin.nix diff --git a/modules/clightning-plugins/trustedcoin.nix b/modules/clightning-plugins/trustedcoin.nix new file mode 100644 index 0000000..7d057c8 --- /dev/null +++ b/modules/clightning-plugins/trustedcoin.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with lib; +let cfg = config.services.clightning.plugins.trustedcoin; in +{ + options.services.clightning.plugins.trustedcoin = { + enable = mkEnableOption "Trustedcoin (clightning plugin)"; + package = mkOption { + type = types.package; + default = config.nix-bitcoin.pkgs.trustedcoin; + defaultText = "config.nix-bitcoin.pkgs.trustedcoin"; + description = "The package providing trustedcoin binaries."; + }; + }; + + config = mkIf cfg.enable { + services.clightning.extraConfig = '' + plugin=${cfg.package}/bin/trustedcoin + ''; + }; +}