rtl: change nodes options

- Move option `rtl.nodes.{lnd,clightning}` -> `rtl.nodes.{lnd,clightning}.enable`
  This is required by the next commit.

- Move option `rtl.loop` -> `rtl.nodes.lnd.loop`

- Only enable loop when `nodes.lnd` is enabled
This commit is contained in:
Erik Arvstedt 2022-05-14 15:21:36 +02:00
parent beae9f8df7
commit ff228a604d
No known key found for this signature in database
GPG key ID: 33312B944DD97846
4 changed files with 52 additions and 38 deletions

View file

@ -283,10 +283,12 @@ in {
};
rtl = {
id = 29;
connections =
optional config.services.rtl.nodes.lnd "lnd" ++
optional config.services.rtl.loop "lightning-loop" ++
optional config.services.rtl.nodes.clightning "clightning-rest";
connections = let
nodes = config.services.rtl.nodes;
in
optional nodes.lnd.enable "lnd" ++
optional (nodes.lnd.enable && nodes.lnd.loop) "lightning-loop" ++
optional nodes.clightning.enable "clightning-rest";
};
clightning-rest = {
id = 30;