global/general: setup msmtp with noreply email
This commit is contained in:
parent
f671ab914d
commit
4dfa32ffd4
2 changed files with 22 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, common, secrets, lib, ... }:
|
||||
{
|
||||
programs = {
|
||||
# Enable dconf for programs that need it
|
||||
|
@ -38,4 +38,24 @@
|
|||
home-manager.sharedModules = [
|
||||
{ programs.man.generateCaches = lib.mkForce false; }
|
||||
];
|
||||
|
||||
programs.msmtp = with common.email; {
|
||||
enable = true;
|
||||
setSendmail = true;
|
||||
defaults = {
|
||||
host = smtp.address;
|
||||
port = smtp.STARTTLS;
|
||||
tls = true;
|
||||
auth = true;
|
||||
};
|
||||
accounts = rec {
|
||||
noreply = {
|
||||
user = outgoing;
|
||||
passwordeval = "cat ${secrets.smtp-password}";
|
||||
};
|
||||
default = noreply // {
|
||||
from = withSubaddress "%U-%H";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ in
|
|||
|
||||
"borg-password" = secrets."borg-password" // { group = "borg"; mode = "440"; };
|
||||
"binary-cache-private-key" = secrets.binary-cache-private-key // lib.optionalAttrs config.services.hydra.enable { group = "hydra"; mode = "440"; };
|
||||
"smtp-password" = withGroup "smtp" secrets."smtp-password";
|
||||
}
|
||||
(mkIf config.services.nginx.enable {
|
||||
inherit (secrets) "cloudflare";
|
||||
|
@ -43,9 +44,6 @@ in
|
|||
(mkIf config.services.freshrss.enable {
|
||||
"freshrss" = withOwnerGroup "freshrss" secrets."freshrss";
|
||||
})
|
||||
(mkIf config.services.forgejo.enable {
|
||||
"smtp-password" = withGroup "smtp" secrets."smtp-password";
|
||||
})
|
||||
(mkIf config.services.hydra.enable {
|
||||
inherit (secrets) hydra;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue