forked from nyanloutre/nixos-config
Correction indentation
This commit is contained in:
parent
a469b5f502
commit
666172bbe8
@ -36,8 +36,8 @@ in
|
|||||||
|
|
||||||
services.haproxy.enable = true;
|
services.haproxy.enable = true;
|
||||||
|
|
||||||
services.haproxy.config = "
|
services.haproxy.config = ''
|
||||||
global
|
global
|
||||||
log /dev/log local0
|
log /dev/log local0
|
||||||
log /dev/log local1 notice
|
log /dev/log local1 notice
|
||||||
user haproxy
|
user haproxy
|
||||||
@ -46,15 +46,15 @@ global
|
|||||||
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
|
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
|
||||||
ssl-default-server-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
|
ssl-default-server-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
|
||||||
ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
|
ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
|
||||||
defaults
|
defaults
|
||||||
option forwardfor
|
option forwardfor
|
||||||
option http-server-close
|
option http-server-close
|
||||||
timeout client 10s
|
timeout client 10s
|
||||||
timeout connect 4s
|
timeout connect 4s
|
||||||
timeout server 30s
|
timeout server 30s
|
||||||
userlist LOUTRE
|
userlist LOUTRE
|
||||||
user paul password $6$6rDdCtzSVsAwB6KP$V8bR7KP7FSL2BSEh6n3op6iYhAnsVSPI2Ar3H6MwKrJ/lZRzUI8a0TwVBD2JPnAntUhLpmRudrvdq2Ls2odAy.
|
user paul password $6$6rDdCtzSVsAwB6KP$V8bR7KP7FSL2BSEh6n3op6iYhAnsVSPI2Ar3H6MwKrJ/lZRzUI8a0TwVBD2JPnAntUhLpmRudrvdq2Ls2odAy.
|
||||||
frontend public
|
frontend public
|
||||||
bind :::80 v4v6
|
bind :::80 v4v6
|
||||||
bind :::443 v4v6 ssl crt /var/lib/acme/${cfg.domaine}/full.pem alpn h2,http/1.1
|
bind :::443 v4v6 ssl crt /var/lib/acme/${cfg.domaine}/full.pem alpn h2,http/1.1
|
||||||
mode http
|
mode http
|
||||||
@ -65,23 +65,23 @@ frontend public
|
|||||||
use_backend letsencrypt-backend if letsencrypt-acl
|
use_backend letsencrypt-backend if letsencrypt-acl
|
||||||
use_backend haproxy_stats if haproxy-acl
|
use_backend haproxy_stats if haproxy-acl
|
||||||
|
|
||||||
${concatStrings (
|
${concatStrings (
|
||||||
mapAttrsToList (name: value:
|
mapAttrsToList (name: value:
|
||||||
" acl ${name}-acl hdr(host) -i ${name}.${cfg.domaine}\n"
|
" acl ${name}-acl hdr(host) -i ${name}.${cfg.domaine}\n"
|
||||||
+ " use_backend ${name}-backend if ${name}-acl\n"
|
+ " use_backend ${name}-backend if ${name}-acl\n"
|
||||||
) cfg.services)}
|
) cfg.services)}
|
||||||
|
|
||||||
backend letsencrypt-backend
|
backend letsencrypt-backend
|
||||||
mode http
|
mode http
|
||||||
server letsencrypt 127.0.0.1:${toString nginx_port}
|
server letsencrypt 127.0.0.1:${toString nginx_port}
|
||||||
backend haproxy_stats
|
backend haproxy_stats
|
||||||
mode http
|
mode http
|
||||||
stats enable
|
stats enable
|
||||||
stats hide-version
|
stats hide-version
|
||||||
acl AuthOK_LOUTRE http_auth(LOUTRE)
|
acl AuthOK_LOUTRE http_auth(LOUTRE)
|
||||||
http-request auth realm LOUTRE if !AuthOK_LOUTRE
|
http-request auth realm LOUTRE if !AuthOK_LOUTRE
|
||||||
|
|
||||||
${concatStrings (
|
${concatStrings (
|
||||||
mapAttrsToList (name: value:
|
mapAttrsToList (name: value:
|
||||||
''
|
''
|
||||||
backend ${name}-backend
|
backend ${name}-backend
|
||||||
@ -91,10 +91,10 @@ ${concatStrings (
|
|||||||
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
||||||
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
||||||
) else "")}
|
) else "")}
|
||||||
|
|
||||||
''
|
''
|
||||||
) cfg.services)}
|
) cfg.services)}
|
||||||
";
|
|
||||||
|
'';
|
||||||
|
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
|
Loading…
Reference in New Issue
Block a user