remove option 'configFileOption'

It doesn't make sense for bitcoind users to completely redefine their
config file. Also, it's poorly named and the description is faulty.

This is a breaking change, but this option has probably no actual users.
This commit is contained in:
Erik Arvstedt 2020-04-07 23:05:06 +02:00
parent 4e5c1d7551
commit 1f8fe310d0
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -68,11 +68,6 @@ in {
default = "/var/lib/bitcoind";
description = "The data directory for bitcoind.";
};
configFileOption = mkOption {
type = types.path;
default = configFile;
description = "The data directory for bitcoind.";
};
user = mkOption {
type = types.str;
default = "bitcoin";
@ -258,7 +253,7 @@ in {
if ! test -e ${cfg.dataDir}/blocks; then
mkdir -m 0770 -p '${cfg.dataDir}/blocks'
fi
cp '${cfg.configFileOption}' '${cfg.dataDir}/bitcoin.conf'
cp '${configFile}' '${cfg.dataDir}/bitcoin.conf'
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
chown -R '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
echo "rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'