HAProxy fails to start with the default 'config'. Better disable it and assert that the user provides a suitable 'config'. (AFAICS, there cannot really be a default config file for HAProxy.)
···18 };
1920 config = mkOption {
21- type = types.lines;
22- default =
23- ''
24- global
25- log 127.0.0.1 local6
26- maxconn 24000
27- daemon
28- nbproc 1
29-30- defaults
31- mode http
32- option httpclose
33-34- # Remove requests from the queue if people press stop button
35- option abortonclose
36-37- # Try to connect this many times on failure
38- retries 3
39-40- # If a client is bound to a particular backend but it goes down,
41- # send them to a different one
42- option redispatch
43-44- monitor-uri /haproxy-ping
45-46- timeout connect 7s
47- timeout queue 300s
48- timeout client 300s
49- timeout server 300s
50-51- # Enable status page at this URL, on the port HAProxy is bound to
52- stats enable
53- stats uri /haproxy-status
54- stats refresh 5s
55- stats realm Haproxy statistics
56- '';
57 description = ''
58 Contents of the HAProxy configuration file,
59 <filename>haproxy.conf</filename>.
···65 };
6667 config = mkIf cfg.enable {
000006869 systemd.services.haproxy = {
70 description = "HAProxy";