blob: f0466846a2749fca472f74006917a812d346f711 [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
Skyler Grey8b4f7b62024-02-17 12:23:02 +000027 ] // {
28 "mail.clicks.codes".postRun = ''
29 cp -r $(pwd) /opt/mailcow-dockerized/data/assets/ssl/
30 cp -r $(pwd)/* /opt/mailcow-dockerized/data/assets/ssl/
31 '';
32 };
Skyler Grey22428b02023-11-19 13:20:56 +000033 defaults.postRun = "cp -r $(pwd) /opt/mailcow-dockerized/data/assets/ssl/";
34 };
35}