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