Add Cloudflare Turnstile integration to Gitea configuration

- Introduced `cloudflare-turnstile` secrets in `secrets.yaml` for enhanced CAPTCHA support.
- Updated Gitea service configuration to enable Turnstile CAPTCHA with the new secret and site keys.
- Modified last modified date and MAC in `secrets.yaml` for security compliance.
This commit is contained in:
2026-07-10 17:54:04 -03:00
parent b70f9f4822
commit 15fcf88da2
2 changed files with 24 additions and 4 deletions
+19 -2
View File
@@ -1,5 +1,13 @@
{ lib, ... }:
{ lib, config, ... }:
let
secretFilePath = ../secrets.yaml;
in
{
sops.secrets."cloudflare-turnstile/secret-key".sopsFile = secretFilePath;
sops.secrets."cloudflare-turnstile/site-key".sopsFile = secretFilePath;
services.gitea = {
enable = true;
@@ -22,7 +30,16 @@
SSH_LISTEN_PORT = 222;
};
service.DISABLE_REGISTRATION = false;
service = {
DISABLE_REGISTRATION = false;
ENABLE_CAPTCHA = true;
CAPTCHA_TYPE = "cfturnstile";
CF_TURNSTILE_SECRET = config.sops.secrets."cloudflare-turnstile/secret-key".path;
CF_TURNSTILE_SITEKEY = config.sops.secrets."cloudflare-turnstile/site-key".path;
REGISTER_EMAIL_CONFIRM = false;
ENABLE_NOTIFY_MAIL = false;
};
};
};