| { config, lib, pkgs, ... }: let |
| mailDomains = [ |
| "clicks.codes" |
| "coded.codes" |
| "hopescaramels.com" |
| "trans.gg" |
| ]; |
| mailACMEHosts = [ |
| "mail.clicks.codes" |
| "mail.coded.codes" |
| "mail.trans.gg" |
| "mail.hopescaramels.com" |
| ] ++ ( |
| builtins.concatMap |
| (domain: [ domain "mail.${domain}" "imap.${domain}" "smtp.${domain}" ]) |
| mailDomains |
| ); |
| in { |
| security.acme = { |
| certs = lib.pipe mailACMEHosts [ |
| (map (name: { inherit name; value = {}; })) |
| builtins.listToAttrs |
| ]; |
| defaults.postRun = "cp -r $(pwd) /opt/mailcow-dockerized/data/assets/ssl/"; |
| }; |
| } |