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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user