erigon: add package option to override default version

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Changed files
+3 -1
nixos
modules
services
blockchain
ethereum
+3 -1
nixos/modules/services/blockchain/ethereum/erigon.nix
···
services.erigon = {
enable = mkEnableOption (lib.mdDoc "Ethereum implementation on the efficiency frontier");
+
package = mkPackageOptionMD pkgs "erigon" { };
+
extraArgs = mkOption {
type = types.listOf types.str;
description = lib.mdDoc "Additional arguments passed to Erigon";
···
serviceConfig = {
LoadCredential = "ERIGON_JWT:${cfg.secretJwtPath}";
-
ExecStart = "${pkgs.erigon}/bin/erigon --config ${configFile} --authrpc.jwtsecret=%d/ERIGON_JWT ${lib.escapeShellArgs cfg.extraArgs}";
+
ExecStart = "${cfg.package}/bin/erigon --config ${configFile} --authrpc.jwtsecret=%d/ERIGON_JWT ${lib.escapeShellArgs cfg.extraArgs}";
DynamicUser = true;
Restart = "on-failure";
StateDirectory = "erigon";