trustedcoin: update to v0.6.1
This commit is contained in:
parent
5b5e76931d
commit
8c00c26fa1
@ -9,17 +9,14 @@ let cfg = config.services.clightning.plugins.trustedcoin; in
|
|||||||
type = types.package;
|
type = types.package;
|
||||||
default = config.nix-bitcoin.pkgs.trustedcoin;
|
default = config.nix-bitcoin.pkgs.trustedcoin;
|
||||||
defaultText = "config.nix-bitcoin.pkgs.trustedcoin";
|
defaultText = "config.nix-bitcoin.pkgs.trustedcoin";
|
||||||
description = mdDoc ''
|
description = mdDoc "The package providing trustedcoin binaries.";
|
||||||
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.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.clightning.extraConfig = ''
|
services.clightning.extraConfig = ''
|
||||||
plugin=${cfg.package}/bin/trustedcoin
|
plugin=${cfg.package}/bin/trustedcoin
|
||||||
|
disable-plugin=bcli
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -30,15 +30,6 @@ let
|
|||||||
This also disables all DNS lookups, to avoid leaking address information.
|
This also disables all DNS lookups, to avoid leaking address information.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
useBcli = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = mdDoc ''
|
|
||||||
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 {
|
dataDir = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/var/lib/clightning";
|
default = "/var/lib/clightning";
|
||||||
@ -116,8 +107,7 @@ let
|
|||||||
network = bitcoind.makeNetworkName "bitcoin" "regtest";
|
network = bitcoind.makeNetworkName "bitcoin" "regtest";
|
||||||
configFile = pkgs.writeText "config" ''
|
configFile = pkgs.writeText "config" ''
|
||||||
network=${network}
|
network=${network}
|
||||||
${optionalString (!cfg.useBcli) "disable-plugin=bcli"}
|
${optionalString (!cfg.plugins.trustedcoin.enable) "bitcoin-datadir=${bitcoind.dataDir}"}
|
||||||
${optionalString (cfg.useBcli) "bitcoin-datadir=${bitcoind.dataDir}"}
|
|
||||||
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
|
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
|
||||||
always-use-proxy=${boolToString cfg.always-use-proxy}
|
always-use-proxy=${boolToString cfg.always-use-proxy}
|
||||||
bind-addr=${cfg.address}:${toString cfg.port}
|
bind-addr=${cfg.address}:${toString cfg.port}
|
||||||
@ -173,6 +163,7 @@ in {
|
|||||||
{
|
{
|
||||||
cat ${configFile}
|
cat ${configFile}
|
||||||
echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword-public)"
|
echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword-public)"
|
||||||
|
|
||||||
${optionalString (cfg.getPublicAddressCmd != "") ''
|
${optionalString (cfg.getPublicAddressCmd != "") ''
|
||||||
echo "announce-addr=$(${cfg.getPublicAddressCmd}):${toString publicPort}"
|
echo "announce-addr=$(${cfg.getPublicAddressCmd}):${toString publicPort}"
|
||||||
''}
|
''}
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "trustedcoin";
|
pname = "trustedcoin";
|
||||||
version = "0.5.2";
|
version = "0.6.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nbd-wtf";
|
owner = "nbd-wtf";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-s8zgY+TDABK96BehY+SVl86wCMd+e8BKdxw0kGV1jAI=";
|
sha256 = "sha256-UNQjxhAT0mK1In7vUtIoMoMNBV+0wkrwbDmm7m+0R3o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-wpK5SW9nOMO/e4DoEk8LRxLykxYt06LoBBxjeEujOiU=";
|
vendorSha256 = "sha256-xvkK9rMQlXTnNyOMd79qxVSvhgPobcBk9cq4/YWbupY=";
|
||||||
|
|
||||||
subPackages = [ "." ];
|
subPackages = [ "." ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user