nix-deploy/config/hosts/rudiger/services/postgres.nix

26 lines
431 B
Nix

{ pkgs, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_15;
ensureDatabases = [
"nextcloud"
];
ensureUsers = [
{
name = "nextcloud";
ensureDBOwnership = true;
}
];
};
services.postgresqlBackup = {
enable = true;
location = "/var/lib/postgresql/backup";
databases = [ "nextcloud" ];
startAt = "02:30";
compression = "none";
};
}