From 714f9a6525f039dd0a62663a9223749c94cb65f8 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 19 Dec 2023 20:08:22 +0000 Subject: [PATCH] Add HAProxy for Git SSH --- hosts/linode/git.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/hosts/linode/git.nix b/hosts/linode/git.nix index b6786d7..23d762b 100644 --- a/hosts/linode/git.nix +++ b/hosts/linode/git.nix @@ -12,6 +12,30 @@ in { proxy_set_header X-Forwarded-Ssl on; ''; }; + + services.haproxy = { + enable = true; + config = builtins.concatStringsSep "\n" [ + "global" + " daemon" + " maxconn 20" + + "defaults" + " timeout connect 500s" + " timeout client 500s" + " timeout server 1h" + + "frontend gitsshd" + " bind *:2222" + " default_backend gitssh" + " timeout client 1h" + + "backend gitssh" + " mode tcp" + " server git-thehellings-lan git.thehellings.lan:2222" + ]; + }; + ########################################################################################## ########### # CI SERVICES