mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
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: ''
|
||||
onionFile=/var/lib/tor/onion/${service}/hostname
|
||||
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
|
||||
'') cfg.services}
|
||||
'';
|
||||
|
@ -94,7 +94,7 @@ in {
|
||||
in srv.public && srv.enable
|
||||
) services;
|
||||
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