mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 12:09:19 +00:00
git: Add configured SSL certificate for SMTP (#1833)
If you have a custom SSL certificate configured for SMTP TLS, git should use it.
This commit is contained in:
@@ -290,6 +290,7 @@ in {
|
||||
"ssl")
|
||||
else
|
||||
"";
|
||||
smtpSslCertPath = mkIf smtp.tls.enable smtp.tls.certificatesFile;
|
||||
smtpServer = smtp.host;
|
||||
smtpUser = userName;
|
||||
from = address;
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
from = "hm@example.org"
|
||||
smtpEncryption = "tls"
|
||||
smtpServer = "smtp.example.org"
|
||||
smtpSslCertPath = "/etc/test/certificates.crt"
|
||||
smtpUser = "home.manager.jr"
|
||||
|
||||
[sendemail "hm@example.com"]
|
||||
from = "hm@example.com"
|
||||
smtpEncryption = "ssl"
|
||||
smtpServer = "smtp.example.com"
|
||||
smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt"
|
||||
smtpUser = "home.manager"
|
||||
|
||||
[user]
|
||||
|
||||
@@ -6,6 +6,8 @@ with lib;
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
accounts.email.accounts.hm-account.smtp.tls.certificatesFile =
|
||||
"/etc/test/certificates.crt";
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitMinimal;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
from = "hm@example.org"
|
||||
smtpEncryption = "tls"
|
||||
smtpServer = "smtp.example.org"
|
||||
smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt"
|
||||
smtpUser = "home.manager.jr"
|
||||
|
||||
[sendemail "hm@example.com"]
|
||||
|
||||
Reference in New Issue
Block a user