services: gitea: ensure database exists

This commit is contained in:
Antoine Martin 2022-06-14 17:58:05 +02:00
parent ee549958d1
commit a21de59c5d

View file

@ -95,6 +95,18 @@ in {
];
};
services.postgresql = {
enable = true;
ensureDatabases = ["gitea"];
ensureUsers = [
{
name = "git";
ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES";
}
];
};
services.postgresqlBackup = {
databases = ["gitea"];
};