Skip to content

Commit

Permalink
bump, update
Browse files Browse the repository at this point in the history
  • Loading branch information
sputn1ck committed Feb 1, 2021
1 parent 351c9cf commit 0c82e25
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 30 deletions.
3 changes: 2 additions & 1 deletion modules/faraday.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let
cfg = config.services.faraday;
inherit (config) nix-bitcoin-services;
secretsDir = config.nix-bitcoin.secretsDir;
network = config.services.bitcoind.network;
in {

options.services.faraday = {
Expand Down Expand Up @@ -56,7 +57,7 @@ in {
${cfg.package}/bin/faraday \
--rpclisten=${cfg.rpclisten} \
--rpcserver=${config.services.lnd.listen}:10009 \
--macaroondir=${config.services.lnd.dataDir}/chain/bitcoin/mainnet \
--macaroondir=${config.services.lnd.dataDir}/chain/bitcoin/${network} \
--tlscertpath=${secretsDir}/lnd-cert \
${cfg.extraArgs}
'';
Expand Down
27 changes: 4 additions & 23 deletions modules/netns-isolation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ in {
id = 27;
connections = [ "lnd" ];
};
faraday = {
id = 28;
connections = [ "lnd" ];
};
};

services.bitcoind = {
Expand Down Expand Up @@ -293,30 +297,7 @@ in {
services.joinmarket.cliExec = mkCliExec "joinmarket";
systemd.services.joinmarket-yieldgenerator.serviceConfig.NetworkNamespacePath = "/var/run/netns/nb-joinmarket";

<<<<<<< HEAD
services.joinmarket-ob-watcher.address = netns.joinmarket-ob-watcher.address;
}
]);
=======
# loop: Custom netns configs
services.lightning-loop = mkIf config.services.lightning-loop.enable {
rpclisten = "${netns.lightning-loop.address}:11010";
restlisten = "${netns.lightning-loop.address}:8081";
cli = pkgs.writeScriptBin "loop"
# Switch user because lnd makes datadir contents readable by user only
''
netns-exec nb-lightning-loop sudo -u lnd ${config.services.lightning-loop.package}/bin/loop --rpcserver ${config.services.lightning-loop.rpclisten} "$@"
'';
};
# faraday: Custom netns configs
services.faraday = mkIf config.services.faraday.enable {
rpclisten = "${netns.faraday.address}:8465";
cli = pkgs.writeScriptBin "frcli"
# Switch user because lnd makes datadir contents readable by user only
''
netns-exec nb-faraday sudo -u lnd ${config.services.faraday.package}/bin/frcli --rpcserver ${config.services.faraday.rpclisten} "$@"
'';
};
};
>>>>>>> c251e46 (loop: add rpclisten and restlisten options)
}
2 changes: 1 addition & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ let self = {
netns-exec = pkgs.callPackage ./netns-exec { };
lightning-loop = pkgs.callPackage ./lightning-loop { };
lightning-pool = pkgs.callPackage ./lightning-pool { };
faraday = pkgs.callPackage ./faraday { };
extra-container = pkgs.callPackage ./extra-container { };
clightning-plugins = import ./clightning-plugins pkgs self.nbPython3Packages;
clboss = pkgs.callPackage ./clboss { };

nbPython3Packages = (pkgs.python3.override {
packageOverrides = pySelf: super: import ./python-packages self pySelf;
}).pkgs;
faraday = pkgs.callPackage ./faraday { };

pinned = import ./pinned.nix;

Expand Down
6 changes: 3 additions & 3 deletions pkgs/faraday/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

buildGoModule rec {
pname = "faraday";
version = "0.2.0-alpha";
version = "0.2.3-alpha";

src = fetchurl {
url = "https://github.com/lightninglabs/faraday/archive/v${version}.tar.gz";
# Use ./get-sha256.sh to fetch latest (verified) sha256
sha256 = "58cdb977909e2188837ee0d00ec47a520baeb3bb09719ea6e1fe23efb9283d06";
sha256 = "c016e2b16160f24abdfce0f71cdb848da3e3d78cff450fb353017d4104bd616e";
};

subPackages = [ "cmd/faraday" "cmd/frcli" ];

vendorSha256 = "1vmspdlh018p453rbif5yc2fqjipnz012rlbilwcrkjric24qbsk";
vendorSha256 = "1hh99nfprlmhkc36arg3w1kxby59i2l7n258cp40niv7bjn37hrq";

meta = with lib; {
description = " Faraday: Lightning Channel Management & Optimization Tool";
Expand Down
5 changes: 3 additions & 2 deletions pkgs/faraday/get-sha256.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# /bin/bash

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p git gnupg
set -euo pipefail

TMPDIR="$(mktemp -d -p /tmp)"
trap "rm -rf $TMPDIR" EXIT
Expand Down

0 comments on commit 0c82e25

Please sign in to comment.