1
0
Fork 0
selfhostblocks/haproxy/siteconfig.nix

21 lines
307 B
Nix
Raw Normal View History

2022-09-14 08:47:49 +02:00
{ 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}
'';
}