nixos: services: gitea: update mail configuration
ci/woodpecker/push/check Pipeline failed Details

This commit is contained in:
Bruno BELANYI 2024-03-05 14:16:22 +00:00
parent ed15e62e1d
commit 40d1b39837
2 changed files with 14 additions and 14 deletions

View File

@ -41,7 +41,7 @@ in
enable = true;
mail = {
enable = true;
host = "smtp.migadu.com:465";
host = "smtp.migadu.com";
user = lib.my.mkMailAddress "gitea" "belanyi.fr";
passwordFile = secrets."gitea/mail-password".path;
};

View File

@ -18,9 +18,15 @@ in
};
host = mkOption {
type = types.str;
example = "smtp.example.com:465";
example = "smtp.example.com";
description = "Host for the mail account";
};
port = mkOption {
type = types.port;
default = 465;
example = 587;
description = "Port for the mail account";
};
user = mkOption {
type = types.str;
example = "gitea@example.com";
@ -31,17 +37,11 @@ in
example = "/run/secrets/gitea-mail-password.txt";
description = "Password for the mail account";
};
type = mkOption {
protocol = mkOption {
type = types.str;
default = "smtp";
default = "smtps";
example = "smtp";
description = "Password for the mail account";
};
tls = mkOption {
type = types.bool;
default = true;
example = false;
description = "Use TLS for connection";
description = "Protocol for connection";
};
};
};
@ -86,11 +86,11 @@ in
mailer = lib.mkIf cfg.mail.enable {
ENABLED = true;
HOST = cfg.mail.host;
SMTP_ADDR = cfg.mail.host;
SMTP_PORT = cfg.mail.port;
FROM = cfg.mail.user;
USER = cfg.mail.user;
MAILER_TYPE = cfg.mail.type;
IS_TLS_ENABLED = cfg.mail.tls;
PROTOCOL = cfg.mail.protocol;
};
service = {