2022-08-26 21:15:06 -07:00
|
|
|
{ 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";
|
2023-03-03 12:00:00 -08:00
|
|
|
description = mdDoc ''
|
2022-08-26 21:15:22 -07:00
|
|
|
The package providing trustedcoin binaries. Trustedcoin will try to
|
|
|
|
use a bitcoind as a trusted source for getting block data. If this
|
|
|
|
fails, it will use a trustedcoin providers instead.
|
|
|
|
'';
|
2022-08-26 21:15:06 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.clightning.extraConfig = ''
|
|
|
|
plugin=${cfg.package}/bin/trustedcoin
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|