-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
b8e10af recurring-donations: Run under recurring-donations user (nixbitcoin) 5d01ea7 nodeinfo: Convert to module and allow alternative operator username (nixbitcoin) 95d230d Remove bitcoinrpc group remnants (nixbitcoin) 563b210 spark-wallet: Run under spark-wallet user (nixbitcoin) 205fca3 bitcoind: only make blocksdir group-readable when dataDirReadableByGroup (nixbitcoin) 81a04a4 lightning-charge: add dedicated user (nixbitcoin) e67a818 lightning-charge: 0.4.14 -> 0.4.19 (nixbitcoin) 0ba5575 clightning: allow group access to RPC socket (nixbitcoin) 304dd29 clightning: remove config group read access (nixbitcoin) 04c6936 clightning: Remove clightning "bitcoinrpc" membership (nixbitcoin) 393ab0f electrs: Remove electrs user from "bitcoinrpc" and "bitcoin" sometimes (nixbitcoin) 7cfae66 electrs: Drop insecure TLS ciphers (nixbitcoin) 4c139a6 electrs: Make TLSProxy truly optional (nixbitcoin) Pull request description: ACKs for top commit: jonasnick: ACK b8e10af Tree-SHA512: d3828961b42b8730818b6f55bd9cb19a9c1a1fcecc426da903ba1304251bb4b3b38ff0e4d7b29945ae1bf3c7a42719431b8c91b74b01aeb8d3671026c3d6df75
- Loading branch information
Showing
17 changed files
with
427 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
operatorName = config.nix-bitcoin.operatorName; | ||
script = pkgs.writeScriptBin "nodeinfo" '' | ||
set -eo pipefail | ||
BITCOIND_ONION="$(cat /var/lib/onion-chef/${operatorName}/bitcoind)" | ||
echo BITCOIND_ONION="$BITCOIND_ONION" | ||
if systemctl is-active --quiet clightning; then | ||
CLIGHTNING_NODEID=$(lightning-cli getinfo | jq -r '.id') | ||
CLIGHTNING_ONION="$(cat /var/lib/onion-chef/${operatorName}/clightning)" | ||
CLIGHTNING_ID="$CLIGHTNING_NODEID@$CLIGHTNING_ONION:9735" | ||
echo CLIGHTNING_NODEID="$CLIGHTNING_NODEID" | ||
echo CLIGHTNING_ONION="$CLIGHTNING_ONION" | ||
echo CLIGHTNING_ID="$CLIGHTNING_ID" | ||
fi | ||
if systemctl is-active --quiet lnd; then | ||
LND_NODEID=$(lncli getinfo | jq -r '.uris[0]') | ||
echo LND_NODEID="$LND_NODEID" | ||
fi | ||
NGINX_ONION_FILE=/var/lib/onion-chef/${operatorName}/nginx | ||
if [ -e "$NGINX_ONION_FILE" ]; then | ||
NGINX_ONION="$(cat $NGINX_ONION_FILE)" | ||
echo NGINX_ONION="$NGINX_ONION" | ||
fi | ||
LIQUIDD_ONION_FILE=/var/lib/onion-chef/${operatorName}/liquidd | ||
if [ -e "$LIQUIDD_ONION_FILE" ]; then | ||
LIQUIDD_ONION="$(cat $LIQUIDD_ONION_FILE)" | ||
echo LIQUIDD_ONION="$LIQUIDD_ONION" | ||
fi | ||
SPARKWALLET_ONION_FILE=/var/lib/onion-chef/${operatorName}/spark-wallet | ||
if [ -e "$SPARKWALLET_ONION_FILE" ]; then | ||
SPARKWALLET_ONION="$(cat $SPARKWALLET_ONION_FILE)" | ||
echo SPARKWALLET_ONION="http://$SPARKWALLET_ONION" | ||
fi | ||
ELECTRS_ONION_FILE=/var/lib/onion-chef/${operatorName}/electrs | ||
if [ -e "$ELECTRS_ONION_FILE" ]; then | ||
ELECTRS_ONION="$(cat $ELECTRS_ONION_FILE)" | ||
echo ELECTRS_ONION="$ELECTRS_ONION" | ||
fi | ||
SSHD_ONION_FILE=/var/lib/onion-chef/${operatorName}/sshd | ||
if [ -e "$SSHD_ONION_FILE" ]; then | ||
SSHD_ONION="$(cat $SSHD_ONION_FILE)" | ||
echo SSHD_ONION="$SSHD_ONION" | ||
fi | ||
''; | ||
in { | ||
options = { | ||
programs.nodeinfo = mkOption { | ||
readOnly = true; | ||
default = script; | ||
}; | ||
}; | ||
|
||
config = { | ||
environment.systemPackages = [ script ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.