clightning: add netns
- Adds clightning to netns-isolation.services - Adds bitcoin-rpcconnect option to allow using clightning with network namespaces - Uses bind-addr option (defaults to localhost) as target of hidden service - Adds different bind-addr options depending on if netns-isolation is enabled or not.
This commit is contained in:
parent
ae1230e13b
commit
3c0c446547
3 changed files with 19 additions and 2 deletions
|
|
@ -88,6 +88,10 @@ in {
|
|||
bitcoind = {
|
||||
id = 12;
|
||||
};
|
||||
clightning = {
|
||||
id = 13;
|
||||
connections = [ "bitcoind" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
|
|
@ -181,9 +185,17 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
# clightning: Custom netns configs
|
||||
services.clightning = mkIf config.services.clightning.enable {
|
||||
bitcoin-rpcconnect = netns.bitcoind.address;
|
||||
bind-addr = "${netns.clightning.address}:${toString config.services.clightning.onionport}";
|
||||
};
|
||||
|
||||
})
|
||||
# Custom netns config option values if netns-isolation not enabled
|
||||
(mkIf (!cfg.enable) {
|
||||
# clightning
|
||||
services.clightning.bind-addr = "127.0.0.1:${toString config.services.clightning.onionport}";
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue