summary refs log tree commit diff
path: root/host/Rory-nginx/services/email/nginx.nix
blob: 19844ba56cb64488a2a54d7c1d79cd9995ec4821 (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
{ 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'";
      };
    };
  };
}