electrs: add consistent address options

This commit is contained in:
Erik Arvstedt 2021-01-14 13:24:06 +01:00
parent 8fa32b7f91
commit b5d76ba1b3
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 10 additions and 11 deletions

View File

@ -9,6 +9,16 @@ let
in { in {
options.services.electrs = { options.services.electrs = {
enable = mkEnableOption "electrs"; enable = mkEnableOption "electrs";
address = mkOption {
type = types.str;
default = "127.0.0.1";
description = "Address to listen for RPC connections.";
};
port = mkOption {
type = types.port;
default = 50001;
description = "RPC port.";
};
dataDir = mkOption { dataDir = mkOption {
type = types.path; type = types.path;
default = "/var/lib/electrs"; default = "/var/lib/electrs";
@ -31,16 +41,6 @@ in {
If enabled, the electrs service will sync faster on high-memory systems ( 8GB). If enabled, the electrs service will sync faster on high-memory systems ( 8GB).
''; '';
}; };
address = mkOption {
type = types.str;
default = "127.0.0.1";
description = "RPC and monitoring listening address.";
};
port = mkOption {
type = types.port;
default = 50001;
description = "RPC port.";
};
monitoringPort = mkOption { monitoringPort = mkOption {
type = types.port; type = types.port;
default = 4224; default = 4224;

View File

@ -92,7 +92,6 @@ in {
# electrs # electrs
services.electrs = { services.electrs = {
port = 50001;
enforceTor = true; enforceTor = true;
}; };
services.tor.hiddenServices.electrs = mkIf cfg.electrs.enable (mkHiddenService { services.tor.hiddenServices.electrs = mkIf cfg.electrs.enable (mkHiddenService {