electrs: add netns
- Adds electrs to netns-isolation.services - Adds daemonrpc option and specifies address option to allow using electrs with network namespaces - Adds host option (defaults to localhost) as target of hidden service
This commit is contained in:
parent
c0b02ac93a
commit
d6296acaba
3 changed files with 30 additions and 1 deletions
|
|
@ -100,6 +100,11 @@ in {
|
|||
id = 15;
|
||||
connections = [ "bitcoind" ];
|
||||
};
|
||||
electrs = {
|
||||
id = 16;
|
||||
connections = [ "bitcoind" ]
|
||||
++ ( optionals config.services.electrs.TLSProxy.enable [ "nginx" ]);
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
|
|
@ -240,6 +245,13 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
# electrs: Custom netns configs
|
||||
services.electrs = mkIf config.services.electrs.enable {
|
||||
host = if config.services.electrs.TLSProxy.enable then netns.nginx.address else netns.electrs.address;
|
||||
address = netns.electrs.address;
|
||||
daemonrpc = "${netns.bitcoind.address}:${toString config.services.bitcoind.rpc.port}";
|
||||
};
|
||||
|
||||
})
|
||||
# Custom netns config option values if netns-isolation not enabled
|
||||
(mkIf (!cfg.enable) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue