aboutsummaryrefslogblamecommitdiff
path: root/nix/hosts/wildcat/configuration.nix
blob: e3d5a9b94d163c1038b9672dd0e2a7ac862d0eb0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                      
 
                                    



                                   

                     
                        




                                        
                                           
                                                   
            




          
{ ... }: {
  networking = {
    firewall.allowedTCPPorts = [
      # nginx
      80
      443
    ];
  };

  security.acme = {
    defaults.email = "acme@fcuny.net";
    acceptTerms = true;
  };

  services.nginx = {
    enable = true;

    recommendedProxySettings = true;
    recommendedGzipSettings = true;
    recommendedOptimisation = true;
    recommendedTlsSettings = true;

    virtualHosts = {
      "fcuny.net" = {
        forceSSL = true;
        enableACME = true;
        locations = {
          "/" = {
            root = "/srv/www/fcuny.net";
          };
          "/.well-known/acme-challenge" = {
            root = "/var/lib/acme/acme-challenges";
          };
        };
      };
    };
  };
}