minor improvements
- README: - Add RTL - examples/configuration.nix: - Fix comment - btcpayserver.nix: - Use nbLib.addressWithPort - Embed optionalString like the other optionalStrings - clboss.nix: - Improve description - clightning.nix: - Option `extraConfig`: Add example, improve description. - Disable `log-timestamps`. Timestamps are already logged via journald. - Simplify `preStart` script - electrs.nix: - Use `port` description wording like in other services.
This commit is contained in:
parent
8aa28da110
commit
bd275d3a9a
6 changed files with 23 additions and 8 deletions
|
|
@ -43,7 +43,16 @@ let
|
|||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra lines appended to the configuration file.";
|
||||
example = ''
|
||||
alias=mynode
|
||||
'';
|
||||
description = ''
|
||||
Extra lines appended to the configuration file.
|
||||
|
||||
See all available options at
|
||||
https://github.com/ElementsProject/lightning/blob/master/doc/lightningd-config.5.md
|
||||
or by running `lightningd --help`.
|
||||
'';
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
|
@ -88,6 +97,7 @@ let
|
|||
bitcoin-rpcport=${toString config.services.bitcoind.rpc.port}
|
||||
bitcoin-rpcuser=${config.services.bitcoind.rpc.users.public.name}
|
||||
rpc-file-mode=0660
|
||||
log-timestamps=false
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
|
|
@ -123,13 +133,14 @@ in {
|
|||
preStart = ''
|
||||
# The RPC socket has to be removed otherwise we might have stale sockets
|
||||
rm -f ${cfg.networkDir}/lightning-rpc
|
||||
install -m 640 ${configFile} '${cfg.dataDir}/config'
|
||||
umask u=rw,g=r,o=
|
||||
{
|
||||
cat ${configFile}
|
||||
echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword-public)"
|
||||
${optionalString (cfg.getPublicAddressCmd != "") ''
|
||||
echo "announce-addr=$(${cfg.getPublicAddressCmd}):${toString publicPort}"
|
||||
''}
|
||||
} >> '${cfg.dataDir}/config'
|
||||
} > '${cfg.dataDir}/config'
|
||||
'';
|
||||
serviceConfig = nbLib.defaultHardening // {
|
||||
ExecStart = "${nbPkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue