modules: move assertion to lnd.nix
nix-bitcoin.nix is now no longer dependent on clightning.nix and lnd.nix. Due to condition '!(config.services ? clightning)' lnd.nix still doesn't depend on clightning.nix. Also fix the assertion message by renaming clightning.bindPort to clightning.port.
This commit is contained in:
parent
cce9a3f6b2
commit
9f7d048769
@ -157,6 +157,16 @@ in {
|
|||||||
{ assertion = bitcoind.prune == 0;
|
{ assertion = bitcoind.prune == 0;
|
||||||
message = "lnd does not support bitcoind pruning.";
|
message = "lnd does not support bitcoind pruning.";
|
||||||
}
|
}
|
||||||
|
{ assertion =
|
||||||
|
!(config.services ? clightning)
|
||||||
|
|| !config.services.clightning.enable
|
||||||
|
|| config.services.clightning.port != cfg.port;
|
||||||
|
message = ''
|
||||||
|
LND and clightning can't both bind to lightning port 9735. Either
|
||||||
|
disable LND/clightning or change services.clightning.port or
|
||||||
|
services.lnd.port to a port other than 9735.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
services.bitcoind = {
|
services.bitcoind = {
|
||||||
|
@ -41,16 +41,4 @@ with lib;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
|
||||||
assertions = [
|
|
||||||
{ assertion = (config.services.lnd.enable -> ( !config.services.clightning.enable || config.services.clightning.port != config.services.lnd.port));
|
|
||||||
message = ''
|
|
||||||
LND and clightning can't both bind to lightning port 9735. Either
|
|
||||||
disable LND/clightning or change services.clightning.bindPort or
|
|
||||||
services.lnd.port to a port other than 9735.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user