{ 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'"; }; }; "autodiscover.rory.gay" = { enableACME = true; forceSSL = true; locations."/".proxyPass = "http://localhost:1323"; }; }; }