From c4cf323873b040a6ae9e0f8834020dd0455b51a8 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 4 Mar 2020 18:09:03 +0100 Subject: [PATCH] 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. --- modules/electrs.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/electrs.nix b/modules/electrs.nix index 923fe74..4ca1cda 100644 --- a/modules/electrs.nix +++ b/modules/electrs.nix @@ -49,6 +49,11 @@ in { default = 50002; 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 = { enable = mkEnableOption "Nginx TLS proxy"; port = mkOption { @@ -81,7 +86,7 @@ in { ${pkgs.nix-bitcoin.electrs}/bin/electrs -vvv \ ${optionalString (!cfg.high-memory) "--jsonrpc-import --index-batch-size=10"} \ --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; Group = cfg.group;