Make synapse wait on postgres

Previously, we've had some errors from synapse starting before postgres. This
commit makes synapse depend on postgres

Change-Id: I3f8d8e7d75f785034149644dea470ff281e6767f
Reviewed-on: https://git.clicks.codes/c/Clicks/NixFiles/+/121
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/common/matrix.nix b/modules/common/matrix.nix
index 9a559f7..b06ee64 100644
--- a/modules/common/matrix.nix
+++ b/modules/common/matrix.nix
@@ -159,6 +159,9 @@
       format = "json";
     };
   };
+
+  systemd.services.matrix-synapse.requires = [ "postgresql.service" ];
+
 } (let isDerived = base != null;
 in if isDerived
 # We cannot use mkIf as both sides are evaluated no matter the condition value