summary refs log tree commit diff
path: root/host/Rory-nginx/services/email/nginx.nix
blob: cb2e4e1826fe958ecdf388e810601d813cd5493d (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
{ config, ... }:
{
  services.nginx.virtualHosts = {
    "mta-sts.rory.gay" = {
      enableACME = true;
      forceSSL = true;
      locations = {
        "/.well-known/mta-sts.txt" = {
          # age 604800
          return = ''
            200 "version: STSv1
                 mode: enforce
                 max_age: 120
                 mx: mail.rory.gay
                 "'';
        };
      };
    };
    "mail.rory.gay" = {
      enableACME = true;
      forceSSL = true;
      locations = {
        "/".return = "200 'OK'";
      };
    };
  };
}