Modularize and improve mail and calendar config

This commit is contained in:
2025-11-29 16:56:20 +01:00
parent 6aac1fb788
commit 44117cf8da
7 changed files with 174 additions and 337 deletions

View File

@@ -1,86 +1,5 @@
{ config, ... }:
{
accounts.email.maildirBasePath = "${config.xdg.dataHome}/mail";
accounts.email.accounts = {
main = {
enable = true;
primary = true;
address = "mail@jelles.net";
imap = {
authentication = "plain";
host = "taylor.mxrouting.net";
port = 993;
tls.enable = true;
};
realName = "Jelle Spreeuwenberg";
smtp = {
authentication = "plain";
host = "taylor.mxrouting.net";
port = 465;
tls.enable = true;
};
thunderbird = {
enable = true;
};
userName = "mail@jelles.net";
};
old = {
enable = true;
address = "mail@jellespreeuwenberg.nl";
imap = {
authentication = "plain";
host = "taylor.mxrouting.net";
port = 993;
tls.enable = true;
};
realName = "Jelle Spreeuwenberg";
smtp = {
authentication = "plain";
host = "taylor.mxrouting.net";
port = 465;
tls.enable = true;
};
thunderbird = {
enable = true;
};
userName = "mail@jellespreeuwenberg.nl";
};
uni = {
# TODO: Thunderbird automatically uses normal password authentication instead of oauth, you have to manually change it
enable = true;
flavor = "outlook.office365.com";
address = "j.spreeuwenberg@student.tue.nl";
realName = "Jelle Spreeuwenberg";
thunderbird = {
enable = true;
settings = id: {
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.server.server_${id}.authMethod" = 10;
};
};
userName = "j.spreeuwenberg@student.tue.nl";
};
work = {
# TODO: Thunderbird automatically uses normal password authentication instead of oauth, you have to manually change it
enable = true;
flavor = "outlook.office365.com";
address = "jelle.spreeuwenberg@yookr.org";
realName = "Jelle Spreeuwenberg";
thunderbird = {
enable = true;
settings = id: {
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.server.server_${id}.authMethod" = 10;
};
};
userName = "jelle.spreeuwenberg@yookr.org";
};
};
programs.thunderbird = {
enable = true;
profiles.kiri = {
@@ -109,4 +28,32 @@
};
};
};
}
# Enable Thunderbird for specific accounts
accounts.email.accounts = {
main = {
thunderbird.enable = true;
};
old = {
thunderbird.enable = true;
};
uni = {
thunderbird = {
enable = true;
settings = id: {
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.server.server_${id}.authMethod" = 10;
};
};
};
work = {
thunderbird = {
enable = true;
settings = id: {
"mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.server.server_${id}.authMethod" = 10;
};
};
};
};
}