2020-11-18 18:01:45 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
2021-09-13 04:40:47 -07:00
|
|
|
options.services.clightning.plugins = {
|
2022-07-25 17:08:01 -07:00
|
|
|
currencyrate.enable = mkEnableOption "Currencyrate (clightning plugin)";
|
2021-09-13 04:40:47 -07:00
|
|
|
helpme.enable = mkEnableOption "Help me (clightning plugin)";
|
|
|
|
monitor.enable = mkEnableOption "Monitor (clightning plugin)";
|
|
|
|
rebalance.enable = mkEnableOption "Rebalance (clightning plugin)";
|
|
|
|
};
|
|
|
|
|
2020-11-18 18:01:45 -08:00
|
|
|
cfg = config.services.clightning.plugins;
|
|
|
|
pluginPkgs = config.nix-bitcoin.pkgs.clightning-plugins;
|
|
|
|
in {
|
|
|
|
imports = [
|
2020-12-21 03:19:15 -08:00
|
|
|
./clboss.nix
|
2022-02-23 11:32:01 -08:00
|
|
|
./commando.nix
|
2022-05-20 02:51:21 -07:00
|
|
|
./feeadjuster.nix
|
2020-11-18 18:01:45 -08:00
|
|
|
./prometheus.nix
|
|
|
|
./summary.nix
|
|
|
|
./zmq.nix
|
|
|
|
];
|
|
|
|
|
2021-09-13 04:40:47 -07:00
|
|
|
inherit options;
|
2020-11-18 18:01:45 -08:00
|
|
|
|
|
|
|
config = {
|
|
|
|
services.clightning.extraConfig = mkMerge [
|
2022-07-25 17:08:01 -07:00
|
|
|
(mkIf cfg.currencyrate.enable "plugin=${pluginPkgs.currencyrate.path}")
|
2020-11-18 18:01:45 -08:00
|
|
|
(mkIf cfg.helpme.enable "plugin=${pluginPkgs.helpme.path}")
|
|
|
|
(mkIf cfg.monitor.enable "plugin=${pluginPkgs.monitor.path}")
|
|
|
|
(mkIf cfg.rebalance.enable "plugin=${pluginPkgs.rebalance.path}")
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|