blob: 9073d56da30cab2e1df2c9177008bc32e75e4922 [file] [log] [blame]
Skyler Grey22428b02023-11-19 13:20:56 +00001{ config, lib, pkgs, ... }: let
2 mailDomains = [
3 "clicks.codes"
4 "coded.codes"
5 "hopescaramels.com"
6 "trans.gg"
Skyler Grey9dfe4972023-12-22 23:33:17 +00007 "starrysky.fyi"
8 "a.starrysky.fyi"
9 "thecoded.prof"
Skyler Grey2b9b1fe2023-12-31 16:12:02 +000010 "turquoise.fyi"
Skyler Grey22428b02023-11-19 13:20:56 +000011 ];
12 mailACMEHosts = [
13 "mail.clicks.codes"
14 "mail.coded.codes"
15 "mail.trans.gg"
16 "mail.hopescaramels.com"
17 ] ++ (
18 builtins.concatMap
19 (domain: [ domain "mail.${domain}" "imap.${domain}" "smtp.${domain}" ])
20 mailDomains
21 );
22in {
23 security.acme = {
24 certs = lib.pipe mailACMEHosts [
25 (map (name: { inherit name; value = {}; }))
26 builtins.listToAttrs
27 ];
28 defaults.postRun = "cp -r $(pwd) /opt/mailcow-dockerized/data/assets/ssl/";
29 };
30}