electrs: wrap long lines in preStart

This commit is contained in:
Erik Arvstedt 2020-03-04 18:08:51 +01:00
parent 301bb91ae5
commit 88080a58bf
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -71,7 +71,11 @@ in {
preStart = ''
mkdir -m 0770 -p ${cfg.dataDir}
chown -R '${cfg.user}:${cfg.group}' ${cfg.dataDir}
echo "${pkgs.nix-bitcoin.electrs}/bin/electrs -vvv ${optionalString (!cfg.high-memory) "--jsonrpc-import --index-batch-size=10"} --timestamp --db-dir ${cfg.dataDir} --daemon-dir /var/lib/bitcoind --cookie=${config.services.bitcoind.rpcuser}:$(cat ${secretsDir}/bitcoin-rpcpassword) --electrum-rpc-addr=127.0.0.1:${toString cfg.port}" > /run/electrs/startscript.sh
echo "${pkgs.nix-bitcoin.electrs}/bin/electrs -vvv" \
${optionalString (!cfg.high-memory) "--jsonrpc-import --index-batch-size=10"} \
"--timestamp --db-dir ${cfg.dataDir} --daemon-dir /var/lib/bitcoind" \
"--cookie=${config.services.bitcoind.rpcuser}:$(cat ${secretsDir}/bitcoin-rpcpassword)" \
"--electrum-rpc-addr=127.0.0.1:${toString cfg.port}" > /run/electrs/startscript.sh
'';
serviceConfig = rec {
RuntimeDirectory = "electrs";