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

25 lines
424 B
Nix

{ ... }:
{
services.postgresql = {
enable = true;
ensureDatabases = [
"nextcloud"
];
ensureUsers = [
{
name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
};
services.postgresqlBackup = {
enable = true;
location = "/var/lib/postgresql/backup";
databases = [ "nextcloud" ];
startAt = "02:30";
compression = "none";
};
}