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:
@@ -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;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user