nixos-config/machines/neo/postgresql/default.nix

40 lines
726 B
Nix
Raw Normal View History

2024-04-24 14:17:04 +02:00
{ pkgs, ... }:
{
services = {
postgresql = {
enable = true;
# version is tied to stateVersion
# manual update required
# MIGRATION REQUIRED WHEN UPDATING
package = pkgs.postgresql_15;
ensureDatabases = [
"dendrite"
"matrix-sliding-sync"
];
2024-04-24 15:11:52 +02:00
ensureUsers = [
{
name = "dendrite";
ensureDBOwnership = true;
}
{
name = "matrix-sliding-sync";
ensureDBOwnership = true;
}
];
2024-04-24 14:17:04 +02:00
};
postgresqlBackup = {
enable = true;
backupAll = true;
# borg will do compression and deduplication
compression = "none";
startAt = "*-*-* 02:00:00";
};
};
}