diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-09-22 22:41:40 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-09-22 22:41:40 +0200 |
commit | 457d9bbc9432a3b43c42948a9075379168c1561f (patch) | |
tree | 0ef5056d03d4cecabbf215bfeed683f2cfce6dbe /nixos/modules/services/matrix | |
parent | 48b203ad2fe920868cbace5c0b8cfb2ac2bdf8c1 (diff) |
nixos/matrix-synapse: wait for network-online.target
While network.target only guarantees that network devices have been
created the `network-online.target` allows delaying service startup
until after a configurable network state has been reached.
This should resolve spurious failures, e.g. when synapse tries to load
the discovery information for its OIDC provider from a remote host.
Diffstat (limited to 'nixos/modules/services/matrix')
-rw-r--r-- | nixos/modules/services/matrix/synapse.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 5cce36f41e50..1354a8cb58b4 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -1022,7 +1022,7 @@ in { systemd.targets.matrix-synapse = lib.mkIf hasWorkers { description = "Synapse Matrix parent target"; - after = [ "network.target" ] ++ optional hasLocalPostgresDB "postgresql.service"; + after = [ "network-online.target" ] ++ optional hasLocalPostgresDB "postgresql.service"; wantedBy = [ "multi-user.target" ]; }; @@ -1036,7 +1036,7 @@ in { unitConfig.ReloadPropagatedFrom = "matrix-synapse.target"; } else { - after = [ "network.target" ] ++ optional hasLocalPostgresDB "postgresql.service"; + after = [ "network-online.target" ] ++ optional hasLocalPostgresDB "postgresql.service"; wantedBy = [ "multi-user.target" ]; }; baseServiceConfig = { |