summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/ymir-nginx.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix
index 975bb344..3d2b7b4c 100644
--- a/custom/ymir-nginx.nix
+++ b/custom/ymir-nginx.nix
@@ -28,6 +28,53 @@ let
28 root /srv/www/acme/$host/; 28 root /srv/www/acme/$host/;
29 } 29 }
30 ''; 30 '';
31
32 mail-autoconfig = let
33 configXML = pkgs.writeTextFile {
34 name = "mail-autoconfig";
35 destination = "/config-v1.1.xml";
36 text = ''
37 <?xml version="1.0" encoding="UTF-8"?>
38 <clientConfig version="1.1">
39 <emailProvider id="praseodym.org">
40 <domain>141.li</domain>
41 <domain>xmpp.li</domain>
42 <domain>yggdrasil.li</domain>
43 <domain>praseodym.org</domain>
44 <domain>kleen.li</domain>
45 <domain>nights.email</domain>
46 <displayName>Praseodym</displayName>
47 <displayShortName>Praseodym</displayShortName>
48 <incomingServer type="imap">
49 <hostname>ymir.yggdrasil.li</hostname>
50 <port>143</port>
51 <socketType>STARTTLS</socketType>
52 <authentication>password-cleartext</authentication>
53 <username>%EMAILLOCALPART%</username>
54 </incomingServer>
55 <outgoingServer type="smtp">
56 <hostname>ymir.yggdrasil.li</hostname>
57 <port>25</port>
58 <socketType>STARTTLS</socketType>
59 <authentication>password-cleartext</authentication>
60 <username>%EMAILLOCALPART%</username>
61 </outgoingServer>
62 <incomingServer type="imap">
63 <hostname>ymir.yggdrasil.li</hostname>
64 <port>993</port>
65 <socketType>SSL</socketType>
66 <authentication>password-cleartext</authentication>
67 <username>%EMAILLOCALPART%</username>
68 </incomingServer>
69 </emailProvider>
70 </clientConfig>
71 '';
72 };
73 in builtins.toFile "mail-autoconfig" ''
74 location /.well-known/autoconfig/mail {
75 root ${configXML};
76 }
77 '';
31in { 78in {
32 services.logrotate = { 79 services.logrotate = {
33 enable = true; 80 enable = true;
@@ -100,6 +147,7 @@ in {
100 147
101 include ${favicon}; 148 include ${favicon};
102 include ${acme}; 149 include ${acme};
150 include ${mail-autoconfig};
103 151
104 root /srv/www/default; 152 root /srv/www/default;
105 } 153 }