From ab4fa3140eb66eb8275f8376e5f99fe598f98111 Mon Sep 17 00:00:00 2001 From: George Date: Fri, 29 May 2026 18:43:31 +0300 Subject: [PATCH] fix?: +gitea v2 --- nixos/system/hectic-lab/hectic-lab.nix | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/nixos/system/hectic-lab/hectic-lab.nix b/nixos/system/hectic-lab/hectic-lab.nix index 7e5421a..5f715a4 100644 --- a/nixos/system/hectic-lab/hectic-lab.nix +++ b/nixos/system/hectic-lab/hectic-lab.nix @@ -330,15 +330,29 @@ in { }; }; - services.gitea = { - enable = true; - settings.server = { - HTTP_PORT = 11011; - SSH_PORT = 11012; + services = { + gitea = { + enable = true; + settings.server = { + HTTP_PORT = 11011; + SSH_PORT = 11012; + }; + database = { + createDatabase = false; + type = "postgres"; + user = "gitea"; + }; }; - database = { - type = "postgres"; - user = "postgres"; + + postgres = { + enable = true; + ensureDatabases = [ "gitea" ]; + ensureUsers = [ + { + name = "gitea"; + ensureDBOwnership = true; + } + ]; }; };