blob: 0dfc2e49fae2f6b1a049cbe1542ebf27f8025d17 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{
pkgs,
options,
config,
...
}:
{
services.maddy = {
enable = true;
primaryDomain = "rory.gay";
hostname = "mail.rory.gay";
ensureAccounts = [
"root@rory.gay"
];
ensureCredentials = {
"root@rory.gay".passwordFile = "/var/lib/maddy/passwd/root";
};
config =
builtins.replaceStrings
[
"imap tcp://0.0.0.0:143"
"submission tcp://0.0.0.0:587"
]
[
"imap tls://0.0.0.0:993 tcp://0.0.0.0:143"
"submission tls://0.0.0.0:465 tcp://0.0.0.0:587"
]
options.services.maddy.config.default;
tls = {
loader = "file";
certificates = [
{
certPath = "/var/lib/acme/mail.rory.gay/fullchain.pem";
keyPath = "/var/lib/acme/mail.rory.gay/key.pem";
}
];
};
};
networking.firewall.allowedTCPPorts = [
993
465
];
users.users.maddy.extraGroups = [ "nginx" ];
}
|