fix(nixos): support Gitea without a reverse proxy

This commit is contained in:
alexion committed 2026-10-22 19:44:13 -04:00
1 parent 5780fe2dc1
commit 0d60b85d13
1 file changed
+4 -1
+4 -1
View File
@@ -11,7 +11,8 @@ in
enable = lib.mkEnableOption "Gitea"; enable = lib.mkEnableOption "Gitea";
reverseProxyAddress = lib.mkOption { reverseProxyAddress = lib.mkOption {
type = lib.types.str; type = lib.types.nullOr lib.types.str;
default = null;
description = "IP address of the reverse proxy trusted to forward client headers."; description = "IP address of the reverse proxy trusted to forward client headers.";
}; };
}; };
@@ -55,6 +56,8 @@ in
START_SSH_SERVER = true; START_SSH_SERVER = true;
SSH_LISTEN_HOST = "0.0.0.0"; SSH_LISTEN_HOST = "0.0.0.0";
SSH_LISTEN_PORT = 2222; SSH_LISTEN_PORT = 2222;
}
// lib.optionalAttrs (cfg.reverseProxyAddress != null) {
REVERSE_PROXY_TRUSTED_PROXIES = "${cfg.reverseProxyAddress}/32"; REVERSE_PROXY_TRUSTED_PROXIES = "${cfg.reverseProxyAddress}/32";
}; };
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;