flake/systems/etna/postgresql.nix
2025-02-03 16:30:06 +01:00

31 lines
668 B
Nix

{ pkgs, ... }:
{
services = {
postgresql = {
enable = true;
package = pkgs.postgresql_16;
settings.port = 5432;
enableTCPIP = true;
ensureDatabases = [
"gatus"
"maddy"
"roundcube"
];
authentication = ''
host gatus gatus vesuvio.fossa-macaroni.ts.net scram-sha-256
host maddy maddy vesuvio.fossa-macaroni.ts.net scram-sha-256
host roundcube roundcube vesuvio.fossa-macaroni.ts.net scram-sha-256
'';
};
postgresqlBackup = {
enable = true;
backupAll = true;
compression = "zstd";
location = "/data/backups/postgresql";
};
};
}