From 6152018038b18235de38392e3124f651bc9966d0 Mon Sep 17 00:00:00 2001 From: notohh Date: Sun, 18 Jun 2023 17:35:31 -0400 Subject: [PATCH] forgejo: use postgres --- hosts/sakura/services/forgejo.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hosts/sakura/services/forgejo.nix b/hosts/sakura/services/forgejo.nix index 14d14a6..7563ac8 100644 --- a/hosts/sakura/services/forgejo.nix +++ b/hosts/sakura/services/forgejo.nix @@ -1,11 +1,17 @@ -{pkgs, ...}: { +{ + pkgs, + config, + lib, + ... +}: { + sops.secrets.forgejo-db = {}; services.gitea = { enable = true; package = pkgs.forgejo; appName = "forgejo"; - stateDir = "/sakura/forgejo"; + stateDir = "/var/lib/forgejo"; settings = { - service.DISABLE_REGISTRATION = true; + service.DISABLE_REGISTRATION = false; ui = { DEFAULT_THEME = "forgejo-dark"; }; @@ -19,6 +25,13 @@ ROOT_URL = "https://git.notohh.dev"; LANDING_PAGE = "/explore/repos"; }; + database = { + DB_TYPE = lib.mkForce "postgres"; + HOST = "192.168.1.211:5432"; + NAME = "forgejo"; + USER = "forgejo"; + PASSWD = "forgejo"; + }; }; }; }