diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 5f86d0e0..d5f1bfee 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -290,6 +290,7 @@ in { "ssl") else ""; + smtpSslCertPath = mkIf smtp.tls.enable smtp.tls.certificatesFile; smtpServer = smtp.host; smtpUser = userName; from = address; diff --git a/tests/modules/programs/git/git-with-email-expected.conf b/tests/modules/programs/git/git-with-email-expected.conf index f48b7c33..c34ab1d7 100644 --- a/tests/modules/programs/git/git-with-email-expected.conf +++ b/tests/modules/programs/git/git-with-email-expected.conf @@ -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] diff --git a/tests/modules/programs/git/git-with-email.nix b/tests/modules/programs/git/git-with-email.nix index 49089a97..ec18ecb9 100644 --- a/tests/modules/programs/git/git-with-email.nix +++ b/tests/modules/programs/git/git-with-email.nix @@ -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; diff --git a/tests/modules/programs/git/git-with-msmtp-expected.conf b/tests/modules/programs/git/git-with-msmtp-expected.conf index b8c99758..1f2c7b79 100644 --- a/tests/modules/programs/git/git-with-msmtp-expected.conf +++ b/tests/modules/programs/git/git-with-msmtp-expected.conf @@ -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"]