Compare commits
2 commits
cc1b9f4794
...
d95a25c61f
Author | SHA1 | Date | |
---|---|---|---|
Antoine Martin | d95a25c61f | ||
Antoine Martin | 9593e8b460 |
|
@ -53,6 +53,14 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
ensureDatabases = ["matrix-synapse"];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "matrix-synapse";
|
||||||
|
ensurePermissions."DATABASE matrix-synapse" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
|
@ -274,11 +282,10 @@ in {
|
||||||
|
|
||||||
my.services.restic-backup = let
|
my.services.restic-backup = let
|
||||||
dataDir = config.services.matrix-synapse.dataDir;
|
dataDir = config.services.matrix-synapse.dataDir;
|
||||||
in
|
in {
|
||||||
mkIf cfg.enable {
|
paths = [dataDir];
|
||||||
paths = [dataDir];
|
# this is just caching for other servers media, doesn't need backup
|
||||||
# this is just caching for other servers media, doesn't need backup
|
exclude = ["${dataDir}/media/remote_*"];
|
||||||
exclude = ["${dataDir}/media/remote_*"];
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue