Files
nixos/hosts/linode/git.nix
T
Greg Hellings 238ddade03 Make things stable again
Jude is now k3s control plane only
Linode connections to vm-gitlab
Gitlab settings working properly
2025-06-17 15:04:19 -05:00

55 lines
1.2 KiB
Nix

{ ... }:
let
srcDomain = "src.thehellings.com";
sshPort = 2222;
in
{
greg.proxies."${srcDomain}" = {
target = "https://vm-gitlab.shire-zebra.ts.net";
ssl = true;
genAliases = false;
extraConfig = ''
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
client_max_body_size 100000m;
'';
};
greg.proxies."registry.thehellings.com" = {
target = "http://vm-gitlab.shire-zebra.ts.net:5000";
ssl = true;
genAliases = false;
extraConfig = ''
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
client_max_body_size 25000m;
'';
};
networking.firewall.allowedTCPPorts = [ sshPort ];
systemd.services.haproxy = {
after = [ "sys-devices-virtual-net-tailscale0.device" ];
};
services.haproxy = {
enable = true;
config = builtins.concatStringsSep "\n" [
"global"
" daemon"
" maxconn 20"
"defaults"
" timeout connect 500s"
" timeout client 500s"
" timeout server 1h"
"listen gitsshd"
" bind *:${toString sshPort}"
" timeout client 1h"
" mode tcp"
" server git-thehellings-lan vm-gitlab.shire-zebra.ts.net:22"
];
};
}