lol

nixos/matrix-sliding-sync: add dependency on matrix-synapse if running locally and restart

+7 -2
+7 -2
nixos/modules/services/matrix/matrix-sliding-sync.nix
··· 80 80 } ]; 81 81 }; 82 82 83 - systemd.services.matrix-sliding-sync = { 84 - after = lib.optional cfg.createDatabase "postgresql.service"; 83 + systemd.services.matrix-sliding-sync = rec { 84 + after = 85 + lib.optional cfg.createDatabase "postgresql.service" 86 + ++ lib.optional config.services.matrix-synapse.enable "matrix-synapse.service"; 87 + wants = after; 85 88 wantedBy = [ "multi-user.target" ]; 86 89 environment = cfg.settings; 87 90 serviceConfig = { ··· 90 93 ExecStart = lib.getExe cfg.package; 91 94 StateDirectory = "matrix-sliding-sync"; 92 95 WorkingDirectory = "%S/matrix-sliding-sync"; 96 + Restart = "on-failure"; 97 + RestartSec = "1s"; 93 98 }; 94 99 }; 95 100 };