electrs: add option 'extraArgs'
Electrs allows defining settings multiple times via cmdline args, but not via config files. So 'extraArgs' is the only way to implement overridable settings, 'extraOptions' wouldn't work.
This commit is contained in:
parent
e731d71232
commit
c4cf323873
|
@ -49,6 +49,11 @@ in {
|
||||||
default = 50002;
|
default = 50002;
|
||||||
description = "Port on which to listen for tor client connections.";
|
description = "Port on which to listen for tor client connections.";
|
||||||
};
|
};
|
||||||
|
extraArgs = mkOption {
|
||||||
|
type = types.separatedString " ";
|
||||||
|
default = "";
|
||||||
|
description = "Extra command line arguments passed to electrs.";
|
||||||
|
};
|
||||||
TLSProxy = {
|
TLSProxy = {
|
||||||
enable = mkEnableOption "Nginx TLS proxy";
|
enable = mkEnableOption "Nginx TLS proxy";
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
|
@ -81,7 +86,7 @@ in {
|
||||||
${pkgs.nix-bitcoin.electrs}/bin/electrs -vvv \
|
${pkgs.nix-bitcoin.electrs}/bin/electrs -vvv \
|
||||||
${optionalString (!cfg.high-memory) "--jsonrpc-import --index-batch-size=10"} \
|
${optionalString (!cfg.high-memory) "--jsonrpc-import --index-batch-size=10"} \
|
||||||
--db-dir '${cfg.dataDir}' --daemon-dir '${config.services.bitcoind.dataDir}' \
|
--db-dir '${cfg.dataDir}' --daemon-dir '${config.services.bitcoind.dataDir}' \
|
||||||
--electrum-rpc-addr=${toString cfg.address}:${toString cfg.port}
|
--electrum-rpc-addr=${toString cfg.address}:${toString cfg.port} ${cfg.extraArgs}
|
||||||
'';
|
'';
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user