nixos: services: gitea: update mail configuration
Some checks failed
ci/woodpecker/push/check Pipeline failed
Some checks failed
ci/woodpecker/push/check Pipeline failed
This commit is contained in:
parent
ed15e62e1d
commit
40d1b39837
|
@ -41,7 +41,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
mail = {
|
mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
host = "smtp.migadu.com:465";
|
host = "smtp.migadu.com";
|
||||||
user = lib.my.mkMailAddress "gitea" "belanyi.fr";
|
user = lib.my.mkMailAddress "gitea" "belanyi.fr";
|
||||||
passwordFile = secrets."gitea/mail-password".path;
|
passwordFile = secrets."gitea/mail-password".path;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,9 +18,15 @@ in
|
||||||
};
|
};
|
||||||
host = mkOption {
|
host = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "smtp.example.com:465";
|
example = "smtp.example.com";
|
||||||
description = "Host for the mail account";
|
description = "Host for the mail account";
|
||||||
};
|
};
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 465;
|
||||||
|
example = 587;
|
||||||
|
description = "Port for the mail account";
|
||||||
|
};
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "gitea@example.com";
|
example = "gitea@example.com";
|
||||||
|
@ -31,17 +37,11 @@ in
|
||||||
example = "/run/secrets/gitea-mail-password.txt";
|
example = "/run/secrets/gitea-mail-password.txt";
|
||||||
description = "Password for the mail account";
|
description = "Password for the mail account";
|
||||||
};
|
};
|
||||||
type = mkOption {
|
protocol = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "smtp";
|
default = "smtps";
|
||||||
example = "smtp";
|
example = "smtp";
|
||||||
description = "Password for the mail account";
|
description = "Protocol for connection";
|
||||||
};
|
|
||||||
tls = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
example = false;
|
|
||||||
description = "Use TLS for connection";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -86,11 +86,11 @@ in
|
||||||
|
|
||||||
mailer = lib.mkIf cfg.mail.enable {
|
mailer = lib.mkIf cfg.mail.enable {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
HOST = cfg.mail.host;
|
SMTP_ADDR = cfg.mail.host;
|
||||||
|
SMTP_PORT = cfg.mail.port;
|
||||||
FROM = cfg.mail.user;
|
FROM = cfg.mail.user;
|
||||||
USER = cfg.mail.user;
|
USER = cfg.mail.user;
|
||||||
MAILER_TYPE = cfg.mail.type;
|
PROTOCOL = cfg.mail.protocol;
|
||||||
IS_TLS_ENABLED = cfg.mail.tls;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
service = {
|
service = {
|
||||||
|
|
Loading…
Reference in a new issue