blob: 681573fc0373b92d6d38b2948bf384408bfa828e [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"
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 );
18in {
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}