nanopos: add netns

- Adds nanopos to netns-isolation.services
- Adds cfg.enforceTor and extraArgs to bring nanopos in line with other
  services
- Adds charged-url option to allow using nanopos with network
  namespaces.
- Modularizes nginx so webindex can be used without nanopos.
- Adds host option (defaults to localhost) as target of hidden service
- Removes unnecessary after
This commit is contained in:
nixbitcoin
2020-06-10 14:44:50 +00:00
parent 7369f0a7ec
commit 582cb86d74
4 changed files with 52 additions and 15 deletions

View File

@@ -115,6 +115,10 @@ in {
# communicates with clightning over lightning-rpc socket
connections = [];
};
nanopos = {
id = 19;
connections = [ "nginx" "lightning-charge" ];
};
};
systemd.services = {
@@ -271,6 +275,12 @@ in {
# lightning-charge: Custom netns configs
services.lightning-charge.host = mkIf config.services.lightning-charge.enable netns.lightning-charge.address;
# nanopos: Custom netns configs
services.nanopos = mkIf config.services.nanopos.enable {
charged-url = "http://${netns.lightning-charge.address}:9112";
host = netns.nanopos.address;
};
})
# Custom netns config option values if netns-isolation not enabled
(mkIf (!cfg.enable) {