Skyler Grey | 22428b0 | 2023-11-19 13:20:56 +0000 | [diff] [blame] | 1 | { config, lib, pkgs, ... }: let |
| 2 | mailDomains = [ |
| 3 | "clicks.codes" |
| 4 | "coded.codes" |
| 5 | "hopescaramels.com" |
| 6 | "trans.gg" |
Skyler Grey | 9dfe497 | 2023-12-22 23:33:17 +0000 | [diff] [blame] | 7 | "starrysky.fyi" |
| 8 | "a.starrysky.fyi" |
| 9 | "thecoded.prof" |
Skyler Grey | 2b9b1fe | 2023-12-31 16:12:02 +0000 | [diff] [blame] | 10 | "turquoise.fyi" |
Skyler Grey | 22428b0 | 2023-11-19 13:20:56 +0000 | [diff] [blame] | 11 | ]; |
| 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 | ); |
| 22 | in { |
| 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 | } |