diff options
author | Sophie Tauchert <sophie@999eagle.moe> | 2023-11-02 19:41:52 +0100 |
---|---|---|
committer | Sophie Tauchert <sophie@999eagle.moe> | 2023-11-05 21:31:20 +0100 |
commit | c8b55396268b9a6f053b7eca85a88d232684aace (patch) | |
tree | 50148658fe514c14d71dd770fc03f229929c0182 /nixos/modules/services | |
parent | 0cbe9f69c234a7700596e943bfae7ef27a31b735 (diff) |
nixos/matrix-sliding-sync: add dependency on matrix-synapse if running locally and restart
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/matrix/matrix-sliding-sync.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nixos/modules/services/matrix/matrix-sliding-sync.nix b/nixos/modules/services/matrix/matrix-sliding-sync.nix index 7e464d6ed589..7caac6038292 100644 --- a/nixos/modules/services/matrix/matrix-sliding-sync.nix +++ b/nixos/modules/services/matrix/matrix-sliding-sync.nix @@ -80,8 +80,11 @@ in } ]; }; - systemd.services.matrix-sliding-sync = { - after = lib.optional cfg.createDatabase "postgresql.service"; + systemd.services.matrix-sliding-sync = rec { + after = + lib.optional cfg.createDatabase "postgresql.service" + ++ lib.optional config.services.matrix-synapse.enable "matrix-synapse.service"; + wants = after; wantedBy = [ "multi-user.target" ]; environment = cfg.settings; serviceConfig = { @@ -90,6 +93,8 @@ in ExecStart = lib.getExe cfg.package; StateDirectory = "matrix-sliding-sync"; WorkingDirectory = "%S/matrix-sliding-sync"; + Restart = "on-failure"; + RestartSec = "1s"; }; }; }; |