From 9bd889b9a25366568240da37231244bd717a6468 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 6 Sep 2023 16:01:39 +0200 Subject: [PATCH] add Thunderbird --- hosts/yodaTab/home-manager.nix | 1 + hosts/yodaTux/home-manager.nix | 1 + modules/programs.nix | 1 - modules/thunderbird.home.nix | 71 ++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 modules/thunderbird.home.nix diff --git a/hosts/yodaTab/home-manager.nix b/hosts/yodaTab/home-manager.nix index 02c8bb7..47d0359 100644 --- a/hosts/yodaTab/home-manager.nix +++ b/hosts/yodaTab/home-manager.nix @@ -11,5 +11,6 @@ in ../../modules/git.home.nix ../../modules/zsh.home.nix ../../modules/nitrokey-ssh-gpg.home.nix + ../../modules/thunderbird.home.nix ]; } diff --git a/hosts/yodaTux/home-manager.nix b/hosts/yodaTux/home-manager.nix index 02c8bb7..47d0359 100644 --- a/hosts/yodaTux/home-manager.nix +++ b/hosts/yodaTux/home-manager.nix @@ -11,5 +11,6 @@ in ../../modules/git.home.nix ../../modules/zsh.home.nix ../../modules/nitrokey-ssh-gpg.home.nix + ../../modules/thunderbird.home.nix ]; } diff --git a/modules/programs.nix b/modules/programs.nix index 287eae5..a3940ee 100644 --- a/modules/programs.nix +++ b/modules/programs.nix @@ -39,7 +39,6 @@ gnome.dconf-editor firefox tor-browser-bundle-bin - thunderbird # email keepassxc # Password manager freetube # YouTube client veracrypt # Encrypted filesystem diff --git a/modules/thunderbird.home.nix b/modules/thunderbird.home.nix new file mode 100644 index 0000000..7afc232 --- /dev/null +++ b/modules/thunderbird.home.nix @@ -0,0 +1,71 @@ +{ config, pkgs, ... }: + +{ + # 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 = { + personal = { + 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; + }; + }; + + programs.thunderbird = { + enable = true; + profiles.default = { + isDefault = true; + #userChrome = ""; + #userContent = ""; + withExternalGnupg = true; + settings = { + "mail.spellcheck.inline" = false; + # Don't execute JavaScript from PDF files. + "pdfjs.enableScripting" = false; + # Use Paragraph format instead of Body Text by default = false + "mail.compose.default_to_paragraph" = false; + "privacy.donottrackheader.enabled" = true; + # 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; + # 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; + }; + }; + }; + }; +}