From 742aef1e0f4f52118211013d00c959debe9e8840 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Fri, 24 Apr 2020 16:21:12 +0200 Subject: [PATCH 1/2] Only set dataDirReadableByGroup if cfg.high-memory is enabled --- examples/configuration.nix | 3 ++- modules/presets/secure-node.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/configuration.nix b/examples/configuration.nix index ee24f4f..e050c45 100644 --- a/examples/configuration.nix +++ b/examples/configuration.nix @@ -63,7 +63,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. + # If you have more than 8GB memory, enable this option so electrs will + # sync faster. # services.electrs.high-memory = true; ### LIQUIDD diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index f36b2f6..8feb283 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -46,7 +46,7 @@ in { services.bitcoind = { enable = true; listen = true; - dataDirReadableByGroup = mkIf cfg.electrs.enable true; + dataDirReadableByGroup = mkIf cfg.electrs.high-memory true; proxy = cfg.tor.client.socksListenAddress; enforceTor = true; port = 8333; From e95f5981aa184ca5dce5a452d57fa279c70eba74 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Fri, 24 Apr 2020 16:27:48 +0200 Subject: [PATCH 2/2] Remove KN countrycode --- pkgs/generate-secrets/generate-secrets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/generate-secrets/generate-secrets.sh b/pkgs/generate-secrets/generate-secrets.sh index 4eac950..3ccbd3f 100755 --- a/pkgs/generate-secrets/generate-secrets.sh +++ b/pkgs/generate-secrets/generate-secrets.sh @@ -18,7 +18,7 @@ makePasswordSecret spark-wallet-password if [[ ! -e nginx-key || ! -e nginx-cert ]]; then openssl genrsa -out nginx-key 2048 - openssl req -new -key nginx-key -out nginx.csr -subj "/C=KN" + openssl req -new -key nginx-key -out nginx.csr -subj '/CN=localhost/O=electrs' openssl x509 -req -days 1825 -in nginx.csr -signkey nginx-key -out nginx-cert rm nginx.csr fi