onionAddresses: remove redundant option 'enable'
The service can be disabled via `onion-addresses.access = mkForce {};` Also remove redundant description.
This commit is contained in:
parent
43c247e3fe
commit
93562f76dd
@ -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" ];
|
||||||
|
@ -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" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user