From 5e5461b06ed37417879e738872621f5ace7d909e Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 2 Mar 2024 11:44:39 +0100 Subject: setup gitea oidc --- modules/git/default.nix | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'modules/git/default.nix') diff --git a/modules/git/default.nix b/modules/git/default.nix index 08b2672..d5cae6a 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -15,11 +15,24 @@ createDatabase = true; }; - settings.server = { - DOMAIN = "git.vapor.systems"; - ROOT_URL = "https://git.vapor.systems"; - PROTOCOL = "http+unix"; - HTTP_ADDR = "/run/gitea/http.sock"; + settings = { + server = { + DOMAIN = "git.vapor.systems"; + ROOT_URL = "https://git.vapor.systems"; + PROTOCOL = "http+unix"; + HTTP_ADDR = "/run/gitea/http.sock"; + }; + + oauth2_client = { + REGISTER_EMAIL_CONFIRM = false; + OPENID_CONNECT_SCOPES = "email profile"; + ENABLE_AUTO_REGISTRATION = true; + ACCOUNT_LINKING = "auto"; + }; + + service = { + DISABLE_REGISTRATION = true; + }; }; }; -- cgit v1.2.3