Add: smtp & outline
This commit is contained in:
parent
41c8f8dd05
commit
b65ebe1186
4 changed files with 57 additions and 0 deletions
26
modules/common/smtp.nix
Normal file
26
modules/common/smtp.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
|
||||
accounts.default = {
|
||||
host = "smtp.protonmail.ch";
|
||||
port = 587;
|
||||
auth = true;
|
||||
tls = true;
|
||||
tls_starttls = true;
|
||||
user = "contact@porzh.me";
|
||||
passwordeval = "cat /run/secrets/proton_pass";
|
||||
from = "contact@porzh.me";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.msmtp ];
|
||||
|
||||
# On place le lien symbolique dans /etc/alternatives, qui est modifiable
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /etc/alternatives/sendmail - - - - ${pkgs.msmtp}/bin/msmtp"
|
||||
"L+ /usr/sbin/sendmail - - - - ${pkgs.msmtp}/bin/msmtp"
|
||||
];
|
||||
|
||||
environment.pathsToLink = [ "/etc/alternatives" "/usr/sbin" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue