1
0
Fork 0
selfhostblocks/haproxy/siteconfig.nix
2023-02-19 20:37:52 -08:00

20 lines
307 B
Nix

{ stdenv
, pkgs
}:
{ serviceName
, serviceSocket
}:
{
acl = ''
acl acl_${serviceName} hdr_beg(host) ${serviceName}.
use_backend ${serviceName} if acl_${serviceName}
'';
backend = ''
backend ${serviceName}
mode http
option forwardfor
server ${serviceName}1 ${serviceSocket}
'';
}