nix-git/modules/thunderbird.nix

100 lines
3.2 KiB
Nix
Raw Normal View History

2024-10-22 12:00:48 +02:00
{ config, pkgs, lib, ... }:
let
# TODO: trim whitespaces from string
email-uni-marburg = (builtins.readFile ../secrets/email-uni-marburg);
in
2023-09-06 16:01:39 +02:00
{
# 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
# https://github.com/yurrriq/dotfiles/blob/main/machines/nixps/home.nix
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
accounts.email.accounts = {
2024-10-22 12:00:48 +02:00
"personal" = {
2023-09-06 16:01:39 +02:00
address = "daniel@systemli.org";
gpg = {
# The key to use as listed in gpg --list-keys.
key = "94F3D3DDAC22802258FC044B6C47C753F0823002";
signByDefault = true;
};
primary = true;
realName = "Daniel Langbein";
userName = "daniel@systemli.org";
imap = {
host = "mail.systemli.org";
port = 993;
};
smtp = {
host = "mail.systemli.org";
port = 465;
};
# Enable the Thunderbird mail client for this email account.
thunderbird.enable = true;
};
2024-10-22 12:00:48 +02:00
"uni-marburg" = {
address = email-uni-marburg;
primary = false;
realName = "Daniel Langbein";
2024-11-19 18:35:37 +01:00
# It seems as if both is possible:
2024-10-22 12:00:48 +02:00
# 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;
};
2023-09-06 16:01:39 +02:00
};
programs.thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
#userChrome = "";
#userContent = "";
withExternalGnupg = true;
settings = {
# Don't execute JavaScript from PDF files.
"pdfjs.enableScripting" = false;
"privacy.donottrackheader.enabled" = true;
2023-09-12 14:50:43 +02:00
2023-09-06 16:01:39 +02:00
# 1: Allow cookies from originating server only
# https://kb.mozillazine.org/Network.cookie.cookieBehavior
"network.cookie.cookieBehavior" = 1;
# 2: Accept for session only
# https://kb.mozillazine.org/Network.cookie.lifetimePolicy
"network.cookie.lifetimePolicy" = 2;
2023-09-12 14:50:43 +02:00
"mail.spellcheck.inline" = false;
# Use Paragraph format instead of Body Text by default = false
"mail.compose.default_to_paragraph" = false;
2023-09-06 16:01:39 +02:00
# When new messages arrive: Show an alert = false
"mail.biff.show_alert" = false;
# When new messages arrive: Play a sound = false
"mail.biff.play_sound" = false;
# Automatically mark messages as read = false
"mailnews.mark_message_read.auto" = false;
# https://wiki.archlinux.org/index.php/Thunderbird#Change_the_default_sorting_order
# Descending
"mailnews.default_sort_order" = 2;
# Threaded view
"mailnews.default_view_flags" = 1;
};
};
};
};
}