Migrate from gitea to forgejo.

This commit is contained in:
Kevin Baensch 2024-05-09 12:41:24 +02:00
parent 3de8ff246f
commit 4c29603f14
Signed by: derped
GPG key ID: C0F1D326C7626543
5 changed files with 23 additions and 23 deletions

View file

@ -0,0 +1,33 @@
{
config,
lib,
...
}:
with lib;
{
vHost =
if config.services.forgejo.enable
then {
root = "${config.services.forgejo.stateDir}/public";
extraConfig = ''
location / {
try_files maintain.html $uri $uri/index.html @node;
}
location @node {
client_max_body_size 0;
proxy_pass http://${config.services.forgejo.settings.server.HTTP_ADDR}:${toString config.services.forgejo.settings.server.HTTP_PORT};
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_max_temp_file_size 0;
proxy_redirect off;
proxy_read_timeout 120;
}
'';
}
else {};
}
.vHost