onion-addresses: mirror nix-bitcoin.onionAddresses.access behavior
This commit fixes an issue with LND, in which if both nix-bitcoin.onionServices.lnd.public & services.lnd.restOnionService.enable were enabled, one would try to create a file named `lnd` and the other would try to create a directory named `lnd` with a file named `lnd-rest` inside it. This would obiously cause an error and fail the LND service.
This commit is contained in:
parent
e873326bfe
commit
ecc601a6d6
|
@ -84,7 +84,7 @@ in {
|
||||||
${concatMapStrings (service: ''
|
${concatMapStrings (service: ''
|
||||||
onionFile=/var/lib/tor/onion/${service}/hostname
|
onionFile=/var/lib/tor/onion/${service}/hostname
|
||||||
if [[ -e $onionFile ]]; then
|
if [[ -e $onionFile ]]; then
|
||||||
install -o ${config.systemd.services.${service}.serviceConfig.User} -m 400 $onionFile ${service}
|
install -D -o ${config.systemd.services.${service}.serviceConfig.User} -m 400 $onionFile services/${service}
|
||||||
fi
|
fi
|
||||||
'') cfg.services}
|
'') cfg.services}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -94,7 +94,7 @@ in {
|
||||||
in srv.public && srv.enable
|
in srv.public && srv.enable
|
||||||
) services;
|
) services;
|
||||||
in genAttrs publicServices' (service: {
|
in genAttrs publicServices' (service: {
|
||||||
getPublicAddressCmd = "cat ${config.nix-bitcoin.onionAddresses.dataDir}/${service}";
|
getPublicAddressCmd = "cat ${config.nix-bitcoin.onionAddresses.dataDir}/services/${service}";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user