Enable gitea in tent

This commit is contained in:
Rodrigo Arias 2025-06-13 11:10:39 +02:00
parent f775907f90
commit afc0f661d0
3 changed files with 36 additions and 0 deletions

View File

@ -10,6 +10,7 @@
./nginx.nix
./nix-serve.nix
./gitlab-runner.nix
./gitea.nix
];
# Select the this using the ID to avoid mismatches

29
m/tent/gitea.nix Normal file
View File

@ -0,0 +1,29 @@
{ config, lib, ... }:
{
services.gitea = {
enable = true;
appName = "Gitea in the jungle";
settings = {
server = {
ROOT_URL = "https://jungle.bsc.es/git/";
LOCAL_ROOT_URL = "https://jungle.bsc.es/git/";
LANDING_PAGE = "explore";
};
metrics.ENABLED = true;
service = {
REGISTER_MANUAL_CONFIRM = true;
ENABLE_NOTIFY_MAIL = true;
};
log.LEVEL = "Warn";
mailer = {
ENABLED = true;
FROM = "jungle-robot@bsc.es";
PROTOCOL = "sendmail";
SENDMAIL_PATH = "/run/wrappers/bin/sendmail";
SENDMAIL_ARGS = "--";
};
};
};
}

View File

@ -34,6 +34,12 @@ in
real_ip_recursive on;
real_ip_header X-Forwarded-For;
location /git {
rewrite ^/git$ / break;
rewrite ^/git/(.*) /$1 break;
proxy_pass http://127.0.0.1:3000;
proxy_redirect http:// $scheme://;
}
location /cache {
rewrite ^/cache/(.*) /$1 break;
proxy_pass http://127.0.0.1:5000;