diff --git a/nixos/hosts/magenta/services/mailserver-accounts.secret.nix b/nixos/hosts/magenta/services/mailserver-accounts.secret.nix index d587317..0ea515d 100644 Binary files a/nixos/hosts/magenta/services/mailserver-accounts.secret.nix and b/nixos/hosts/magenta/services/mailserver-accounts.secret.nix differ diff --git a/nixos/hosts/magenta/services/mailserver.nix b/nixos/hosts/magenta/services/mailserver.nix index d1a3e81..558cbee 100644 --- a/nixos/hosts/magenta/services/mailserver.nix +++ b/nixos/hosts/magenta/services/mailserver.nix @@ -9,6 +9,7 @@ let # Source: https://www.zdyn.net/docker/2022/02/04/acme-certificate.html dumpTraefikMailCerts = pkgs.writeScript "dump-mail-certs" '' #!/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}") | .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 mailserver = { enable = true; - fqdn = "mail.pleshevski.ru"; - domains = [ "pleshevski.ru" ]; # We use traefik to generate certificates certificateScheme = 1;