mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01: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:
parent
69e2693342
commit
39e4991856
4 changed files with 6 additions and 0 deletions
|
@ -290,6 +290,7 @@ in {
|
||||||
"ssl")
|
"ssl")
|
||||||
else
|
else
|
||||||
"";
|
"";
|
||||||
|
smtpSslCertPath = mkIf smtp.tls.enable smtp.tls.certificatesFile;
|
||||||
smtpServer = smtp.host;
|
smtpServer = smtp.host;
|
||||||
smtpUser = userName;
|
smtpUser = userName;
|
||||||
from = address;
|
from = address;
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
from = "hm@example.org"
|
from = "hm@example.org"
|
||||||
smtpEncryption = "tls"
|
smtpEncryption = "tls"
|
||||||
smtpServer = "smtp.example.org"
|
smtpServer = "smtp.example.org"
|
||||||
|
smtpSslCertPath = "/etc/test/certificates.crt"
|
||||||
smtpUser = "home.manager.jr"
|
smtpUser = "home.manager.jr"
|
||||||
|
|
||||||
[sendemail "hm@example.com"]
|
[sendemail "hm@example.com"]
|
||||||
from = "hm@example.com"
|
from = "hm@example.com"
|
||||||
smtpEncryption = "ssl"
|
smtpEncryption = "ssl"
|
||||||
smtpServer = "smtp.example.com"
|
smtpServer = "smtp.example.com"
|
||||||
|
smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt"
|
||||||
smtpUser = "home.manager"
|
smtpUser = "home.manager"
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
|
|
|
@ -6,6 +6,8 @@ with lib;
|
||||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
accounts.email.accounts.hm-account.smtp.tls.certificatesFile =
|
||||||
|
"/etc/test/certificates.crt";
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitMinimal;
|
package = pkgs.gitMinimal;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
from = "hm@example.org"
|
from = "hm@example.org"
|
||||||
smtpEncryption = "tls"
|
smtpEncryption = "tls"
|
||||||
smtpServer = "smtp.example.org"
|
smtpServer = "smtp.example.org"
|
||||||
|
smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt"
|
||||||
smtpUser = "home.manager.jr"
|
smtpUser = "home.manager.jr"
|
||||||
|
|
||||||
[sendemail "hm@example.com"]
|
[sendemail "hm@example.com"]
|
||||||
|
|
Loading…
Reference in a new issue