From 15c7898e8e8f7b96a8b1b220721425d889ffa8d9 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Tue, 3 Jan 2023 17:18:39 +0100 Subject: [PATCH] services: gitea add reverse proxy --- modules/services/server/gitea.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/services/server/gitea.nix b/modules/services/server/gitea.nix index 08664d1..2fe1261 100644 --- a/modules/services/server/gitea.nix +++ b/modules/services/server/gitea.nix @@ -64,6 +64,20 @@ service.DISABLE_REGISTRATION = true; }; + services.nginx = { + enable = true; + recommendedTlsSettings = true; + recommendedOptimisation = true; + recommendedGzipSettings = true; + recommendedProxySettings = true; + virtualHosts = { + "${config.services.gitea.domain}" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://localhost:3000"; + }; + }; + # age.secrets."services/gitea/mailerPassword" = { # file = ../../../secrets/services/gitea/mailerPassword.age; # owner = "gitea";