From 6d3cc3b327b1f0b2ea89f566c271cc9cf004de9e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 2 Feb 2019 15:39:03 +0100 Subject: ... --- custom/ymir-nginx.nix | 90 +++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 3d2b7b4c..8df451fd 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -29,52 +29,46 @@ let } ''; - mail-autoconfig = let - configXML = pkgs.writeTextFile { - name = "mail-autoconfig"; - destination = "/config-v1.1.xml"; - text = '' - - - - 141.li - xmpp.li - yggdrasil.li - praseodym.org - kleen.li - nights.email - Praseodym - Praseodym - - ymir.yggdrasil.li - 143 - STARTTLS - password-cleartext - %EMAILLOCALPART% - - - ymir.yggdrasil.li - 25 - STARTTLS - password-cleartext - %EMAILLOCALPART% - - - ymir.yggdrasil.li - 993 - SSL - password-cleartext - %EMAILLOCALPART% - - - - ''; - }; - in builtins.toFile "mail-autoconfig" '' - location /.well-known/autoconfig/mail { - root ${configXML}; - } - ''; + mail-autoconfig = pkgs.writeTextFile { + name = "mail-autoconfig"; + destination = "/config-v1.1.xml"; + text = '' + + + + 141.li + xmpp.li + yggdrasil.li + praseodym.org + kleen.li + nights.email + Praseodym + Praseodym + + ymir.yggdrasil.li + 143 + STARTTLS + password-cleartext + %EMAILLOCALPART% + + + ymir.yggdrasil.li + 25 + STARTTLS + password-cleartext + %EMAILLOCALPART% + + + ymir.yggdrasil.li + 993 + SSL + password-cleartext + %EMAILLOCALPART% + + + + ''; + }; in { services.logrotate = { enable = true; @@ -150,6 +144,10 @@ in { include ${mail-autoconfig}; root /srv/www/default; + + location /.well-known/autoconfig/mail { + root ${mail-autoconfig}; + } } server { -- cgit v1.2.3