mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
neomutt: allow default email sending behaviour (#7476)
If neither neomutt.sendMailCommand nor passCmd are set, leave configuration for sending emails unset. This will leave neomutt to manage sending emails itself, which matches the existing description of the `accounts.email.accounts.<name>.neomutt.sendMailCommand` configuration option. This also removes the assertion added in bd680a8c (neomutt: allow default email sending behaviour, 2025-07-12), since it is now valid to have neither passCmd nor neomutt.sendMailCommand on an account.
This commit is contained in:
parent
13a83d1b65
commit
e4bf85da68
1 changed files with 10 additions and 13 deletions
|
|
@ -223,7 +223,7 @@ let
|
||||||
{
|
{
|
||||||
sendmail = "'${neomutt.sendMailCommand}'";
|
sendmail = "'${neomutt.sendMailCommand}'";
|
||||||
}
|
}
|
||||||
else
|
else if passwordCommand != null then
|
||||||
let
|
let
|
||||||
smtpProto = if smtp.tls.enable && !smtp.tls.useStartTls then "smtps" else "smtp";
|
smtpProto = if smtp.tls.enable && !smtp.tls.useStartTls then "smtps" else "smtp";
|
||||||
smtpPort = if smtp.port != null then ":${toString smtp.port}" else "";
|
smtpPort = if smtp.port != null then ":${toString smtp.port}" else "";
|
||||||
|
|
@ -232,7 +232,9 @@ let
|
||||||
{
|
{
|
||||||
smtp_url = "'${smtpBaseUrl}'";
|
smtp_url = "'${smtpBaseUrl}'";
|
||||||
smtp_pass = ''"`${passCmd}`"'';
|
smtp_pass = ''"`${passCmd}`"'';
|
||||||
};
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
|
||||||
genAccountConfig =
|
genAccountConfig =
|
||||||
account:
|
account:
|
||||||
|
|
@ -537,17 +539,12 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
assertions =
|
assertions = [
|
||||||
[
|
{
|
||||||
{
|
assertion = ((filter (b: (lib.length (lib.toList b.map)) == 0) (cfg.binds ++ cfg.macros)) == [ ]);
|
||||||
assertion = ((filter (b: (lib.length (lib.toList b.map)) == 0) (cfg.binds ++ cfg.macros)) == [ ]);
|
message = "The 'programs.neomutt.(binds|macros).map' list must contain at least one element.";
|
||||||
message = "The 'programs.neomutt.(binds|macros).map' list must contain at least one element.";
|
}
|
||||||
}
|
];
|
||||||
]
|
|
||||||
++ lib.mapAttrsToList (n: a: {
|
|
||||||
assertion = a.neomutt.sendMailCommand != null || a.passwordCommand != null;
|
|
||||||
message = "'accounts.email.accounts.${n}' needs either 'neomutt.sendMailCommand' or 'passwordCommand' set.";
|
|
||||||
}) neomuttAccountsCfg;
|
|
||||||
|
|
||||||
warnings =
|
warnings =
|
||||||
let
|
let
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue