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:
nixbitcoin 2020-06-10 14:31:38 +00:00
parent ae1230e13b
commit 3c0c446547
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
3 changed files with 19 additions and 2 deletions

View file

@ -12,6 +12,7 @@ let
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
always-use-proxy=${if cfg.always-use-proxy then "true" else "false"}
${optionalString (cfg.bind-addr != null) "bind-addr=${cfg.bind-addr}"}
${optionalString (cfg.bitcoin-rpcconnect != null) "bitcoin-rpcconnect=${cfg.bitcoin-rpcconnect}"}
bitcoin-rpcuser=${config.services.bitcoind.rpcuser}
rpc-file-mode=0660
'';
@ -54,6 +55,11 @@ in {
default = false;
description = "Announce clightning Tor Hidden Service";
};
bitcoin-rpcconnect = mkOption {
type = types.nullOr types.str;
default = null;
description = "The bitcoind RPC host to connect to.";
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/clightning";