Add msmtp to send notifications via email

Reviewed-by: Aleix Roca Nonell <aleix.rocanonell@bsc.es>
This commit is contained in:
2024-05-02 17:54:09 +02:00
parent 81b680a7d2
commit dbd95dd7b8
4 changed files with 36 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
./nix-serve.nix
./public-inbox.nix
./gitea.nix
./msmtp.nix
#./pxe.nix
];

24
m/hut/msmtp.nix Normal file
View File

@@ -0,0 +1,24 @@
{ config, lib, ... }:
{
age.secrets.jungleRobotPassword = {
file = ../../secrets/jungle-robot-password.age;
group = "gitea";
mode = "440";
};
programs.msmtp = {
enable = true;
accounts = {
default = {
auth = true;
tls = true;
tls_starttls = false;
port = 465;
host = "mail.bsc.es";
user = "jungle-robot";
passwordeval = "cat ${config.age.secrets.jungleRobotPassword.path}";
from = "jungle-robot@bsc.es";
};
};
};
}