Added gitea to media server

This commit is contained in:
Random936 2024-11-28 11:44:04 -08:00
parent 2d8d8c89f3
commit 8458b6327a

View File

@ -66,19 +66,68 @@
}; };
}; };
# Gitea
services.gitea = {
enable = true;
settings = {
server = {
ROOT_URL = "https://git.randomctf.com";
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 3300;
DOMAIN = "git.randomctf.com";
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
# SSH Config for Gitea
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
extraConfig = ''
Match User gitea
AllowTCPForwarding no
AllowAgentForwarding no
PasswordAuthentication no
X11Forwarding no
PermitTTY no
'';
};
# NGINX Reverse Proxy Setup # NGINX Reverse Proxy Setup
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${config.services.nextcloud.hostName} = { virtualHosts = {
${config.services.nextcloud.hostName} = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
"git.randomctf.com" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
access_log /var/log/nginx/access.git.log;
'';
locations."/".extraConfig = ''
proxy_buffering off;
proxy_pass http://localhost:3300/;
'';
};
};
}; };
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
certs = { certs = {
${config.services.nextcloud.hostName}.email = "admin@randomctf.com"; ${config.services.nextcloud.hostName}.email = "admin@randomctf.com";
${config.services.gitea.settings.server.DOMAIN}.email = "admin@randomctf.com";
}; };
}; };