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 | 22428b0 | 2023-11-19 13:20:56 +0000 | [diff] [blame] | 10 | ]; |
| 11 | mailACMEHosts = [ |
| 12 | "mail.clicks.codes" |
| 13 | "mail.coded.codes" |
| 14 | "mail.trans.gg" |
| 15 | "mail.hopescaramels.com" |
| 16 | ] ++ ( |
| 17 | builtins.concatMap |
| 18 | (domain: [ domain "mail.${domain}" "imap.${domain}" "smtp.${domain}" ]) |
| 19 | mailDomains |
| 20 | ); |
| 21 | in { |
| 22 | security.acme = { |
| 23 | certs = lib.pipe mailACMEHosts [ |
| 24 | (map (name: { inherit name; value = {}; })) |
| 25 | builtins.listToAttrs |
| 26 | ]; |
| 27 | defaults.postRun = "cp -r $(pwd) /opt/mailcow-dockerized/data/assets/ssl/"; |
| 28 | }; |
| 29 | } |