diff --git a/configuration.nix b/configuration.nix index dfb3f9d..5bbed3b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -41,6 +41,8 @@ # Electrum Server in Rust. Only enable this if hardware wallets are # disabled. # services.electrs.enable = true; + # If you have ≥8GB memory, enable this option so electrs will sync faster. + # services.electrs.high-memory = true; ### LIQUIDD # Enable this module to use Liquid, a sidechain for an inter-exchange diff --git a/modules/electrs.nix b/modules/electrs.nix index c5fc634..810d815 100644 --- a/modules/electrs.nix +++ b/modules/electrs.nix @@ -41,19 +41,19 @@ in { port = mkOption { type = types.ints.u16; default = 50001; - description = "Override the default port on which to listen for connections."; + description = "RPC port."; }; onionport = mkOption { type = types.ints.u16; default = 50002; - description = "Override the default port on which to listen for connections."; + description = "Port on which to listen for tor client connections."; }; nginxport = mkOption { type = types.ints.u16; default = 50003; - description = "Override the default port on which to listen for connections."; + description = "Port on which to listen for TLS client connections."; }; - enforceTor = nix-bitcoin-services.enforceTor; + enforceTor = nix-bitcoin-services.enforceTor; }; config = mkIf cfg.enable { diff --git a/modules/nix-bitcoin-services.nix b/modules/nix-bitcoin-services.nix index 9ca97b9..12132f3 100644 --- a/modules/nix-bitcoin-services.nix +++ b/modules/nix-bitcoin-services.nix @@ -32,14 +32,14 @@ in # Allow any traffic allowAnyIP = { IPAddressAllow = "any"; }; - enforceTor = mkOption { - type = types.bool; - default = false; - description = '' - "Whether to force Tor on a service by only allowing connections from and - to 127.0.0.1;"; - ''; - }; + enforceTor = mkOption { + type = types.bool; + default = false; + description = '' + "Whether to force Tor on a service by only allowing connections from and + to 127.0.0.1;"; + ''; + }; } diff --git a/modules/nix-bitcoin.nix b/modules/nix-bitcoin.nix index b3def0b..530a347 100644 --- a/modules/nix-bitcoin.nix +++ b/modules/nix-bitcoin.nix @@ -161,7 +161,6 @@ in { services.electrs.enforceTor = true; services.electrs.onionport = 50002; services.electrs.nginxport = 50003; - services.electrs.high-memory = false; services.tor.hiddenServices.electrs = { map = [{ port = config.services.electrs.onionport; toPort = config.services.electrs.nginxport;