nix-config/modules/home/email.nix
2026-08-10 22:08:15 +02:00

132 lines
4.9 KiB
Nix

{ pkgs, config, ... }:
let
mkHetzner = address: {
enable = true;
realName = "Moritz Huber";
inherit address;
userName = address;
imap.host = "mail.your-server.de";
imap.port = 993;
smtp.host = "mail.your-server.de";
smtp.port = 465;
smtp.tls.enable = true;
smtp.tls.useStartTls = false;
thunderbird.enable = true;
};
mkFachschaft = account: {
enable = true;
realName = "Moritz Huber";
address = "${account}@fs.cs.hm.edu";
userName = account;
imap.host = "mail.fs.cs.hm.edu";
imap.port = 993;
smtp.host = "mail.fs.cs.hm.edu";
smtp.port = 587;
smtp.tls.useStartTls = true;
thunderbird.enable = true;
};
in
{
programs.thunderbird = {
enable = true;
package = pkgs.thunderbird-esr;
languagePacks = [
"en-US"
"de"
];
profiles.default = {
isDefault = true;
settings = {
"calendar.week.start" = 1;
# 1 = Start my reply above the quote
"mail.identity.default.reply_on_top" = 1;
# false = Place signature below my reply (above the quote)
"mail.identity.default.sig_bottom" = false;
};
accountsOrder = [
"moritz@fs07.link"
"mail@moritzhuber.de"
"2nd@moritzhuber.de"
"mhuber@fs.cs.hm.edu"
"admin@fs.cs.hm.edu"
"moritz.huber@hm.edu"
"munita@fs.cs.hm.edu"
"moritzh123456@gmail.com"
"erstitueten@fs.cs.hm.edu"
"webmaster@moritzhuber.de"
];
};
};
home.packages = with pkgs; [
hunspell
hunspellDicts.de_DE
];
accounts.email.accounts = {
"moritz@fs07.link" = {
enable = true;
realName = "Moritz Huber";
address = "moritz@fs07.link";
userName = "moritz@fs07.link";
imap.host = "mail.fs07.link";
imap.port = 993;
smtp.host = "mail.fs07.link";
smtp.port = 465;
smtp.tls.enable = true;
smtp.tls.useStartTls = false;
thunderbird.enable = true;
};
"mail@moritzhuber.de" = (mkHetzner "mail@moritzhuber.de") // {
primary = true;
};
"2nd@moritzhuber.de" = mkHetzner "2nd@moritzhuber.de";
"mhuber@fs.cs.hm.edu" = mkFachschaft "mhuber" // {
signature = {
htmlFormat = true;
showSignature = "append";
text = ''
<p>&nbsp;</p>
<div id="_rc_sig">
<div class="moz-signature" style="color: #000000;"><span style="font-family: Arial;"><strong><span style="color: #e03e2d;">Moritz Huber</span></strong></span>
<div class="moz-signature">
<div class="pre"><span style="font-family: Arial;"><span style="color: #7e8c8d;">Leitung Adminteam</span></span></div>
<div class="pre">&nbsp;</div>
<div class="pre"><span style="color: #7e8c8d; font-size: 12pt; font-family: arial, helvetica, sans-serif;"><img src="https://fs.cs.hm.edu/wp-content/uploads/2024/03/fs-logo-256.png" width="98" height="120" align="left" hspace="24" /></span><span style="color: #7e8c8d; font-size: 12pt; font-family: arial, helvetica, sans-serif;"></span>
<div class="pre">
<div class="pre"><span style="font-family: Arial;"><span style="color: #e03e2d;">Fachschaft 07 (Informatik &amp; Mathematik)</span></span></div>
<span style="font-family: Arial;"><span style="color: #7e8c8d;">Hochschule M&uuml;nchen - University of Applied Sciences</span></span></div>
<div class="pre"><span style="font-family: Arial;"><span style="color: #7e8c8d;">E-Mail: <a class="moz-txt-link-freetext" style="color: #7e8c8d;" href="mailto:mhuber@fs.cs.hm.edu" rel="noopener">mhuber@fs.cs.hm.edu</a></span></span></div>
<div class="pre"><span style="font-family: Arial;"><span style="color: #7e8c8d;">Webseite: <a style="color: #7e8c8d;" href="https://fs.cs.hm.edu/" rel="noopener">fs.cs.hm.edu</a></span></span></div>
<div class="pre"><span style="font-family: Arial;"><span style="color: #7e8c8d;">Adresse: <a style="color: #7e8c8d;" href="https://www.google.com/maps/place/Lothstra%C3%9Fe+64,+80335+M%C3%BCnchen/@48.1551295,11.5532432">Lothstr. 64, 80335 M&uuml;nchen</a></span></span></div>
<div class="pre"><span style="font-family: Arial;"><span style="color: #7e8c8d;">Raum: R0.013</span></span></div>
</div>
</div>
</div>
</div>
</div>
'';
};
};
"admin@fs.cs.hm.edu" = mkFachschaft "admin";
"moritz.huber@hm.edu" = {
enable = true;
realName = "Moritz Huber";
address = "moritz.huber@hm.edu";
flavor = "outlook.office365.com-ews";
thunderbird.enable = true;
};
"munita@fs.cs.hm.edu" = mkFachschaft "munita";
"moritzh123456@gmail.com" = {
realName = "Moritz Huber";
address = "moritzh123456@gmail.com";
userName = "moritzh123456@gmail.com";
flavor = "gmail.com";
thunderbird.enable = true;
};
"erstitueten@fs.cs.hm.edu" = mkFachschaft "erstitueten";
"webmaster@moritzhuber.de" = mkHetzner "webmaster@moritzhuber.de";
};
}