aboutsummaryrefslogblamecommitdiff
path: root/nix/hosts/wildcat/configuration.nix
blob: 23ac05f6e2102045be0ba396abcf9b4eceaf8b85 (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" = {
        addSSL = true;
        enableACME = true;
        locations = {
          "/" = {
            root = "/srv/www/fcuny.net";
          };
          "/.well-known/acme-challenge" = {
            root = "/var/lib/acme/.challenges";
          };
        };
      };
    };
  };
}