diff --git a/services/gitea/default.nix b/services/gitea/default.nix index c6472fb..0c40c93 100644 --- a/services/gitea/default.nix +++ b/services/gitea/default.nix @@ -95,6 +95,18 @@ in { ]; }; + services.postgresql = { + enable = true; + + ensureDatabases = ["gitea"]; + ensureUsers = [ + { + name = "git"; + ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES"; + } + ]; + }; + services.postgresqlBackup = { databases = ["gitea"]; };