Merge fort-nix/nix-bitcoin#530: onion-services: don't propagate restart of onion-addresses to depending services

a3490dfc0f onion-services: don't propagate restart of `onion-addresses` to depending services (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    utACK a3490dfc0f

Tree-SHA512: a060e22d6db5b986d41d50b4efff1d24fd514a4faae6152e37521681e373b074d18d901f274d182445a8446fd7fcee1b6b2728bc3fda8f2f1b97a77d92a93aeb
This commit is contained in:
Jonas Nick 2022-08-13 19:07:09 +00:00
commit 8404385d60
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 6 additions and 1 deletions

View File

@ -376,6 +376,9 @@ in {
# are not restarted when the secrets target restarts. # are not restarted when the secrets target restarts.
# The secrets target always restarts when deploying with one of the methods # The secrets target always restarts when deploying with one of the methods
# in ./deployment. # in ./deployment.
#
# TODO-EXTERNAL: Instead of `wants`, use a future systemd dependency type
# that propagates initial start failures but no restarts
wants = [ "nix-bitcoin-secrets.target" ]; wants = [ "nix-bitcoin-secrets.target" ];
after = [ "network.target" "nix-bitcoin-secrets.target" ]; after = [ "network.target" "nix-bitcoin-secrets.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -80,7 +80,9 @@ in {
systemd.services = let systemd.services = let
onionAddresses = [ "onion-addresses.service" ]; onionAddresses = [ "onion-addresses.service" ];
in genAttrs publicServices (service: { in genAttrs publicServices (service: {
requires = onionAddresses; # TODO-EXTERNAL: Instead of `wants`, use a future systemd dependency type
# that propagates initial start failures but no restarts
wants = onionAddresses;
after = onionAddresses; after = onionAddresses;
}); });
}) })