From 205fca357677c3b186658379618c9eb2655f6167 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Sun, 3 May 2020 14:03:01 +0200 Subject: [PATCH] bitcoind: only make blocksdir group-readable when dataDirReadableByGroup --- modules/bitcoind.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index a082a5c..810cb9d 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -268,7 +268,7 @@ in { mkdir -m 0770 -p '${cfg.dataDir}/blocks' fi chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}' - chmod -R g+rX '${cfg.dataDir}/blocks' + ${optionalString cfg.dataDirReadableByGroup "chmod -R g+rX '${cfg.dataDir}/blocks'"} cfg=$(cat ${configFile}; printf "rpcpassword="; cat "${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword") confFile='${cfg.dataDir}/bitcoin.conf'