From 25a1acb284f77617380def3944c46757b7cd4f1f Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 22 Oct 2024 12:00:48 +0200 Subject: [PATCH] thunderbird: add uni-marburg email --- modules/thunderbird.nix | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/modules/thunderbird.nix b/modules/thunderbird.nix index c23730a..260ef0e 100644 --- a/modules/thunderbird.nix +++ b/modules/thunderbird.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: +let + # TODO: trim whitespaces from string + email-uni-marburg = (builtins.readFile ../secrets/email-uni-marburg); +in { # https://github.com/NotAShelf/nyx/blob/main/homes/notashelf/graphical/apps/thunderbird/default.nix # https://github.com/dr460nf1r3/dr460nixed/blob/main/home-manager/email.nix @@ -6,7 +10,7 @@ home-manager.users.yoda = { osConfig, config, pkgs, ... }: { accounts.email.accounts = { - personal = { + "personal" = { address = "daniel@systemli.org"; gpg = { # The key to use as listed in gpg --list-keys. @@ -29,6 +33,29 @@ # Enable the Thunderbird mail client for this email account. thunderbird.enable = true; }; + + "uni-marburg" = { + address = email-uni-marburg; + primary = false; + realName = "Daniel Langbein"; + + # It sees as if both is possible: + # userName: part of email before "@" + # userName: full email + #userName = lib.head (lib.splitString "@" email-uni-marburg); + userName = email-uni-marburg; + imap = { + host = "imap.students.uni-marburg.de"; + port = 993; + }; + smtp = { + host = "smtp.students.uni-marburg.de"; + port = 465; + }; + + # Enable the Thunderbird mail client for this email account. + thunderbird.enable = true; + }; }; programs.thunderbird = {