magenta: change mailserver accounts

This commit is contained in:
Dmitriy Pleshevskiy 2023-06-05 13:56:10 +03:00
parent b48e044e3c
commit c021660fe1
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
2 changed files with 1 additions and 2 deletions

View file

@ -9,6 +9,7 @@ let
# Source: https://www.zdyn.net/docker/2022/02/04/acme-certificate.html # Source: https://www.zdyn.net/docker/2022/02/04/acme-certificate.html
dumpTraefikMailCerts = pkgs.writeScript "dump-mail-certs" '' dumpTraefikMailCerts = pkgs.writeScript "dump-mail-certs" ''
#!/bin/sh #!/bin/sh
mkdir -p $(dirname "${cfg.certificateFile}") $(dirname "${cfg.keyFile}")
${pkgs.jq}/bin/jq -r '.le.Certificates[] | select(.domain.main=="${cfg.fqdn}") | .certificate' /var/lib/traefik/acme.json | base64 -d > ${cfg.certificateFile} ${pkgs.jq}/bin/jq -r '.le.Certificates[] | select(.domain.main=="${cfg.fqdn}") | .certificate' /var/lib/traefik/acme.json | base64 -d > ${cfg.certificateFile}
${pkgs.jq}/bin/jq -r '.le.Certificates[] | select(.domain.main=="${cfg.fqdn}") | .key' /var/lib/traefik/acme.json | base64 -d > ${cfg.keyFile} ${pkgs.jq}/bin/jq -r '.le.Certificates[] | select(.domain.main=="${cfg.fqdn}") | .key' /var/lib/traefik/acme.json | base64 -d > ${cfg.keyFile}
''; '';
@ -20,8 +21,6 @@ in
# See: https://nixos-mailserver.readthedocs.io/en/latest/options.html # See: https://nixos-mailserver.readthedocs.io/en/latest/options.html
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.pleshevski.ru";
domains = [ "pleshevski.ru" ];
# We use traefik to generate certificates # We use traefik to generate certificates
certificateScheme = 1; certificateScheme = 1;