From 8b9d33d70c483a6084e3207691107645e68dc18a Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 16 Jul 2024 17:14:23 +0200 Subject: [PATCH] forgejo: disable registrations, enable auto-registration for SSO --- services/forgejo/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/services/forgejo/default.nix b/services/forgejo/default.nix index 8df6de6..b4de166 100644 --- a/services/forgejo/default.nix +++ b/services/forgejo/default.nix @@ -49,7 +49,16 @@ in COOKIE_NAME = "session"; }; - # TODO: SSO, disable registrations + service = { + DISABLE_REGISTRATION = true; + DEFAULT_KEEP_EMAIL_PRIVATE = true; + }; + + oauth2_client = { + REGISTER_EMAIL_CONFIRM = false; + ENABLE_AUTO_REGISTRATION = true; + }; + # TODO: transactional mails # TODO: redis cache instead of default in-memory