diff --git a/email.nix b/email.nix index 3392f70..252425f 100644 --- a/email.nix +++ b/email.nix @@ -26,4 +26,16 @@ in { certificateFile = "/var/lib/acme/${root_host}/fullchain.pem"; keyFile = "/var/lib/acme/${root_host}/key.pem"; }; + + services.nginx = { + enable = true; + virtualHosts."${mail_host}" = { # you should NOT be here from a browser :P + serverName = mail_host; + forceSSL = true; + useACMEHost = root_host; + locations."/" = { + return = "307 https://${root_host}"; + }; + }; + }; }