diff --git a/services/matrix.nix b/services/matrix.nix index d28e462..eab7e37 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -53,14 +53,6 @@ in { config = mkIf cfg.enable { services.postgresql = { enable = true; - - ensureDatabases = ["matrix-synapse"]; - ensureUsers = [ - { - name = "matrix-synapse"; - ensurePermissions."DATABASE matrix-synapse" = "ALL PRIVILEGES"; - } - ]; }; services.postgresqlBackup = { @@ -282,10 +274,11 @@ in { my.services.restic-backup = let dataDir = config.services.matrix-synapse.dataDir; - in { - paths = [dataDir]; - # this is just caching for other servers media, doesn't need backup - exclude = ["${dataDir}/media/remote_*"]; - }; + in + mkIf cfg.enable { + paths = [dataDir]; + # this is just caching for other servers media, doesn't need backup + exclude = ["${dataDir}/media/remote_*"]; + }; }; }