onionAddresses: remove redundant option 'enable'

The service can be disabled via `onion-addresses.access = mkForce {};`

Also remove redundant description.
This commit is contained in:
Erik Arvstedt 2021-01-14 13:24:12 +01:00
parent 43c247e3fe
commit 93562f76dd
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 1 additions and 11 deletions

View File

@ -44,13 +44,6 @@ let
''; '';
in { in {
options.nix-bitcoin.onionAddresses = { options.nix-bitcoin.onionAddresses = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, the onion-addresses service will be installed.
'';
};
access = mkOption { access = mkOption {
type = types.attrs; type = types.attrs;
default = {}; default = {};
@ -67,9 +60,8 @@ in {
}; };
}; };
config = mkIf cfg.enable { config = mkIf (cfg.access != {}) {
systemd.services.onion-addresses = { systemd.services.onion-addresses = {
description = "Run onion-addresses";
wantedBy = [ "tor.service" ]; wantedBy = [ "tor.service" ];
bindsTo = [ "tor.service" ]; bindsTo = [ "tor.service" ];
after = [ "tor.service" ]; after = [ "tor.service" ];

View File

@ -125,7 +125,6 @@ in {
]; ];
nix-bitcoin.onionAddresses = { nix-bitcoin.onionAddresses = {
enable = true;
access.${operatorName} = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "btcpayserver" "sshd" ]; access.${operatorName} = [ "bitcoind" "clightning" "nginx" "liquidd" "spark-wallet" "electrs" "btcpayserver" "sshd" ];
}; };

View File

@ -72,7 +72,6 @@ in {
}]; }];
version = 3; version = 3;
}; };
nix-bitcoin.onionAddresses.enable = cfg.onion-service;
nix-bitcoin.onionAddresses.access.spark-wallet = if cfg.onion-service then [ "spark-wallet" ] else []; nix-bitcoin.onionAddresses.access.spark-wallet = if cfg.onion-service then [ "spark-wallet" ] else [];
systemd.services.spark-wallet = { systemd.services.spark-wallet = {
description = "Run spark-wallet"; description = "Run spark-wallet";