From 954f7d4d086cdefbcdc954c74e3e81187b34b842 Mon Sep 17 00:00:00 2001 From: June Date: Mon, 5 Jan 2026 20:21:52 +0100 Subject: [PATCH] tweak forgejo service configuration a bit making it nicer - Enable Git LFS support, since it's nice to have. - Enable offline mode to avoid relying on CDNs (and to not use Gravatar). - Enable notification mails for repo activity. - Put setting for default repo units into "repository" category as the "repo" category doesn't exist. - Also disable all repo units except code, as they mostly aren't needed for private repos and can be easily enabled on-demand. --- config/hosts/forgejo/forgejo.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/hosts/forgejo/forgejo.nix b/config/hosts/forgejo/forgejo.nix index c60c00f..2b2aea8 100644 --- a/config/hosts/forgejo/forgejo.nix +++ b/config/hosts/forgejo/forgejo.nix @@ -4,6 +4,7 @@ enable = true; package = pkgs.forgejo; database.type = "postgres"; + lfs.enable = true; settings = { DEFAULT = { @@ -17,6 +18,7 @@ ROOT_URL = "https://git.nekover.se/"; # LOCAL_ROOT_URL is apparently what Forgejo uses to access itself. # Doesn't need to be set. + OFFLINE_MODE = true; }; admin = { DISABLE_REGULAR_ORG_CREATION = false; @@ -34,11 +36,10 @@ DEFAULT_USER_VISIBILITY = "limited"; DEFAULT_KEEP_EMAIL_PRIVATE = true; ENABLE_BASIC_AUTHENTICATION = false; - }; - repo = { - DEFAULT_REPO_UNITS = "repo.code,repo.issues,repo.pulls"; + ENABLE_NOTIFY_MAIL = true; }; repository = { + DEFAULT_REPO_UNITS = "repo.code"; ENABLE_PUSH_CREATE_USER = true; ENABLE_PUSH_CREATE_ORG = true; };