1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

git: correct value of envelopeSender for msmtp (#1838)

The value should be "auto", not `true`.

Also fix news entry.
This commit is contained in:
Andrew Fontaine 2021-02-28 14:42:44 -05:00 committed by GitHub
parent aa479b0124
commit f45c7000d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -1865,8 +1865,9 @@ in
}
{
time = "2021-02-25T22:36:43+00:00";
condition = config.programs.git.enable
&& any config.accounts.email.accounts (account: account.msmtp.enable);
condition = config.programs.git.enable && any (msmtp: msmtp.enable)
(mapAttrsToList (name: account: account.msmtp)
config.accounts.email.accounts);
message = ''
Git will now defer to msmtp for sending emails if
'accounts.email.accounts.<name>.msmtp.enable' is true.

View file

@ -278,7 +278,7 @@ in {
with account;
nameValuePair "sendemail.${name}" (if account.msmtp.enable then {
smtpServer = "${pkgs.msmtp}/bin/msmtp";
envelopeSender = true;
envelopeSender = "auto";
from = address;
} else
{

View file

@ -5,7 +5,7 @@
smtpUser = "home.manager.jr"
[sendemail "hm@example.com"]
envelopeSender = true
envelopeSender = "auto"
from = "hm@example.com"
smtpServer = "@msmtp@/bin/msmtp"

View file

@ -39,7 +39,7 @@ with lib;
assertGitConfig "sendemail.hm@example.com.from" "hm@example.com"
assertGitConfig "sendemail.hm-account.from" "hm@example.org"
assertGitConfig "sendemail.hm@example.com.smtpServer" "${pkgs.msmtp}/bin/msmtp"
assertGitConfig "sendemail.hm@example.com.envelopeSender" "true"
assertGitConfig "sendemail.hm@example.com.envelopeSender" "auto"
'';
};
}