1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39: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"; time = "2021-02-25T22:36:43+00:00";
condition = config.programs.git.enable condition = config.programs.git.enable && any (msmtp: msmtp.enable)
&& any config.accounts.email.accounts (account: account.msmtp.enable); (mapAttrsToList (name: account: account.msmtp)
config.accounts.email.accounts);
message = '' message = ''
Git will now defer to msmtp for sending emails if Git will now defer to msmtp for sending emails if
'accounts.email.accounts.<name>.msmtp.enable' is true. 'accounts.email.accounts.<name>.msmtp.enable' is true.

View file

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

View file

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

View file

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