diff options
-rw-r--r-- | modules/services/dendrite.nix | 1 | ||||
-rw-r--r-- | overlays/sliding-sync-module.nix | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/services/dendrite.nix b/modules/services/dendrite.nix index 70f9db8..fe19e11 100644 --- a/modules/services/dendrite.nix +++ b/modules/services/dendrite.nix @@ -154,6 +154,7 @@ in bindAddr = "[::1]:8009"; db = "postgres:///syncv3?host=/run/postgresql"; secret = cfg.secrets.sliding-sync-secret; + after = [ "dendrite.service" ]; }; services.postgresql.enable = true; diff --git a/overlays/sliding-sync-module.nix b/overlays/sliding-sync-module.nix index c9e3f59..8117e2b 100644 --- a/overlays/sliding-sync-module.nix +++ b/overlays/sliding-sync-module.nix @@ -57,6 +57,13 @@ in If unset does not send OTLP traces. ''; }; + after = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = null; + description = lib.mdDoc '' + The service that should start before the sliding-sync proxy. + ''; + }; }; config = lib.mkIf cfg.enable { @@ -64,7 +71,7 @@ in description = "MSC3575 Matrix Sliding Sync Proxy"; after = [ "network.target" - ]; + ] ++ cfg.after; wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "simple"; |