nixos-config/hosts/chunk/postgres.nix
cy 3351dcc6aa
init shiori
Signed-off-by: cy <cy@cy7.sh>
2025-01-27 13:04:53 -05:00

31 lines
492 B
Nix

{
pkgs,
...
}:
{
services.postgresql = {
enable = true;
settings.port = 5432;
package = pkgs.postgresql_17;
enableTCPIP = true;
ensureDatabases = [
"hedgedoc"
"atticd"
"shiori"
];
ensureUsers = [
{
name = "atticd";
ensureDBOwnership = true;
}
{
name = "shiori";
ensureDBOwnership = true;
}
];
};
services.postgresqlBackup = {
enable = true;
startAt = "hourly";
};
}