From 93562f76dd0da0ccc77e71e522fb75332ed674ed Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 14 Jan 2021 13:24:12 +0100 Subject: [PATCH] onionAddresses: remove redundant option 'enable' The service can be disabled via `onion-addresses.access = mkForce {};` Also remove redundant description. --- modules/onion-addresses.nix | 10 +--------- modules/presets/secure-node.nix | 1 - modules/spark-wallet.nix | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/onion-addresses.nix b/modules/onion-addresses.nix index 27d20e3..65809ea 100644 --- a/modules/onion-addresses.nix +++ b/modules/onion-addresses.nix @@ -44,13 +44,6 @@ let ''; in { options.nix-bitcoin.onionAddresses = { - enable = mkOption { - type = types.bool; - default = false; - description = '' - If enabled, the onion-addresses service will be installed. - ''; - }; access = mkOption { type = types.attrs; default = {}; @@ -67,9 +60,8 @@ in { }; }; - config = mkIf cfg.enable { + config = mkIf (cfg.access != {}) { systemd.services.onion-addresses = { - description = "Run onion-addresses"; wantedBy = [ "tor.service" ]; bindsTo = [ "tor.service" ]; after = [ "tor.service" ]; diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index 8d77160..570c6c0 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -125,7 +125,6 @@ in { ]; nix-bitcoin.onionAddresses = { - enable = true; access.${operatorName} = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "btcpayserver" "sshd" ]; }; diff --git a/modules/spark-wallet.nix b/modules/spark-wallet.nix index 0e2a12d..52bcee1 100644 --- a/modules/spark-wallet.nix +++ b/modules/spark-wallet.nix @@ -72,7 +72,6 @@ in { }]; version = 3; }; - nix-bitcoin.onionAddresses.enable = cfg.onion-service; nix-bitcoin.onionAddresses.access.spark-wallet = if cfg.onion-service then [ "spark-wallet" ] else []; systemd.services.spark-wallet = { description = "Run spark-wallet";