Files
nixconf/hosts/nixcloud/services.d/git.nix
T
2026-07-06 01:22:54 -06:00

31 lines
702 B
Nix

{ config, lib, pkgs, ... }:
{
services.gitea = {
enable = true;
captcha = {
enable = true;
};
database = {
type = "postgres";
};
settings = {
server = {
DISABLE_REGISTRATION = false;
DOMAIN = "git.k3t.dev";
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 34951;
ROOT_URL = "https://git.k3t.dev/";
SSH_PORT = 34952;
};
};
};
services.nginx.virtualHosts."git.k3t.dev".enableACME = true;
services.caddy.virtualHosts."git.k3t.dev".extraConfig = ''
encode zstd gzip
reverse_proxy :${toString config.services.gittea.settinggs.server.HTTP_PORT} {
header_up X-Real-IP {remote_host}
}
'';
}