clightning: enable config file read access for group

Enables lightning-cli group access when nonstandard config options are set.
This commit is contained in:
Erik Arvstedt 2020-10-16 17:42:59 +02:00
parent ddadaed3da
commit abd32cde30
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -123,7 +123,7 @@ in {
chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
# The RPC socket has to be removed otherwise we might have stale sockets
rm -f ${cfg.dataDir}/bitcoin/lightning-rpc
chmod 600 ${cfg.dataDir}/config
chmod 640 ${cfg.dataDir}/config
echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword-public)" >> '${cfg.dataDir}/config'
${optionalString cfg.announce-tor "echo announce-addr=$(cat /var/lib/onion-chef/clightning/clightning) >> '${cfg.dataDir}/config'"}
'';