aboutsummaryrefslogtreecommitdiff
path: root/nix/hosts/wildcat/configuration.nix
blob: e3d5a9b94d163c1038b9672dd0e2a7ac862d0eb0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ ... }: {
  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";
          };
        };
      };
    };
  };
}