service: gitea&nginx

This commit is contained in:
Sky
2026-01-27 11:59:50 +00:00
parent a4b60e72a8
commit 1463b7fe63
6 changed files with 85 additions and 12 deletions

View File

@@ -1,3 +1,33 @@
{ ... }:
{ secrets, ... }:
{ }
{
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."git.colorsky.fun" = {
forceSSL = true;
useACMEHost = "colorsky.fun";
locations."/".proxyPass = "http://localhost:3000";
extraConfig = ''
listen [::]:8443 ssl;
'';
};
virtualHosts."192.168.68.59" = { };
};
security.acme = {
acceptTerms = true;
defaults.email = "i@colorsky.fun";
certs."colorsky.fun" = {
domain = "*.colorsky.fun";
dnsProvider = "cloudflare";
dnsPropagationCheck = true;
group = "nginx";
environmentFile = secrets.files.cloudflare-api-key;
};
};
}