mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
clightning-plugins: add trustedcoin
This commit is contained in:
parent
c747ddbf32
commit
3d26f72b7f
@ -17,6 +17,7 @@ in {
|
||||
./feeadjuster.nix
|
||||
./prometheus.nix
|
||||
./summary.nix
|
||||
./trustedcoin.nix
|
||||
./zmq.nix
|
||||
];
|
||||
|
||||
|
@ -9,7 +9,11 @@ let cfg = config.services.clightning.plugins.trustedcoin; in
|
||||
type = types.package;
|
||||
default = config.nix-bitcoin.pkgs.trustedcoin;
|
||||
defaultText = "config.nix-bitcoin.pkgs.trustedcoin";
|
||||
description = "The package providing trustedcoin binaries.";
|
||||
description = ''
|
||||
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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,15 @@ let
|
||||
This also disables all DNS lookups, to avoid leaking address information.
|
||||
'';
|
||||
};
|
||||
useBcli = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
If clightning should use the bitcoind as a main source for getting
|
||||
on-chain block data. Disable this to use a trustedcoin provider (the
|
||||
trustedcoin plugin will be automatically enabled).
|
||||
'';
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/clightning";
|
||||
@ -107,13 +116,16 @@ let
|
||||
network = bitcoind.makeNetworkName "bitcoin" "regtest";
|
||||
configFile = pkgs.writeText "config" ''
|
||||
network=${network}
|
||||
bitcoin-datadir=${bitcoind.dataDir}
|
||||
${optionalString (!cfg.useBcli) "disable-plugin=bcli"}
|
||||
${optionalString (cfg.useBcli) "bitcoin-datadir=${bitcoind.dataDir}"}
|
||||
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
|
||||
always-use-proxy=${boolToString cfg.always-use-proxy}
|
||||
bind-addr=${cfg.address}:${toString cfg.port}
|
||||
|
||||
bitcoin-rpcconnect=${nbLib.address bitcoind.rpc.address}
|
||||
bitcoin-rpcport=${toString bitcoind.rpc.port}
|
||||
bitcoin-rpcuser=${bitcoind.rpc.users.public.name}
|
||||
|
||||
rpc-file-mode=0660
|
||||
log-timestamps=false
|
||||
${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"}
|
||||
|
Loading…
Reference in New Issue
Block a user