lndconnect-onion: fix for custom operator names

This commit is contained in:
Erik Arvstedt 2022-06-02 12:34:45 +02:00
parent a99fad2235
commit cbf327c808
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -70,6 +70,8 @@ let
--adminmacaroonpath='${macaroonPath}' \
--configfile=/dev/null "$@"
'';
operatorName = config.nix-bitcoin.operator.name;
in {
inherit options;
@ -108,12 +110,12 @@ in {
};
};
# This also allows nodeinfo to show the clightning-rest onion address
nix-bitcoin.onionAddresses.access.operator = [ "clightning-rest" ];
nix-bitcoin.onionAddresses.access.${operatorName} = [ "clightning-rest" ];
environment.systemPackages = [(
mkLndconnect {
name = "lndconnect-onion-clightning";
onionService = "operator/clightning-rest";
onionService = "${operatorName}/clightning-rest";
port = clightning-rest.port;
certPath = "${clightning-rest.dataDir}/certs/certificate.pem";
macaroonPath = "${clightning-rest.dataDir}/certs/access.macaroon";