spark-wallet: add netns

- Adds spark-wallet to netns-isolation.services
- Adds extraArgs option to allow using spark-wallet with network
  namespaces
- Adds host option (defaults to localhost) as target of hidden service
- Adds enforceTor option to bring in line with other services
This commit is contained in:
nixbitcoin
2020-07-21 09:38:45 +00:00
parent d6296acaba
commit c4ab73d51f
3 changed files with 32 additions and 5 deletions
+11
View File
@@ -105,6 +105,11 @@ in {
connections = [ "bitcoind" ]
++ ( optionals config.services.electrs.TLSProxy.enable [ "nginx" ]);
};
spark-wallet = {
id = 17;
# communicates with clightning over lightning-rpc socket
connections = [];
};
};
systemd.services = {
@@ -252,6 +257,12 @@ in {
daemonrpc = "${netns.bitcoind.address}:${toString config.services.bitcoind.rpc.port}";
};
# spark-wallet: Custom netns configs
services.spark-wallet = mkIf config.services.spark-wallet.enable {
host = netns.spark-wallet.address;
extraArgs = "--no-tls";
};
})
# Custom netns config option values if netns-isolation not enabled
(mkIf (!cfg.enable) {