add 'enable-tor' preset

Move 'enforceTor' and onion-service definitions from secure-node.nix.
Use the onionServices module to define onion services.

Onion services now automatically work for services that bind to an INADDR_ANY (`0.0.0.0`) address.
This commit is contained in:
Erik Arvstedt 2021-01-14 13:24:18 +01:00
parent 05b5402bb1
commit 87fb9f246b
No known key found for this signature in database
GPG key ID: 33312B944DD97846
3 changed files with 47 additions and 62 deletions

View file

@ -99,5 +99,14 @@ in {
getPublicAddressCmd = "cat ${config.nix-bitcoin.onionAddresses.dataDir}/${service}/${service}";
});
}
# Set sensible defaults for some services
{
nix-bitcoin.onionServices = {
btcpayserver = {
externalPort = 80;
};
};
}
];
}