ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 { pkgs, lib, config, ... }:

{

  services.nginx.clientMaxBodySize = "2g";

  dns.zones."ctu.cx".subdomains."stasicontainer.home".CNAME  = [ "${config.networking.fqdn}." ];

  services.nginx.virtualHosts."stasicontainer.home.ctu.cx" = {
    enableACME = true;
    forceSSL   = true;
    kTLS       = true;
    locations."/".proxyPass       = "http://172.18.0.2:80/";
    locations."/".proxyWebsockets = true;
    locations."/".extraConfig     = ''
      proxy_set_header X-Forwarded-For $remote_addr;
      proxy_set_header X-Forwarded-Proto $scheme;
    '';
  };

}