From b40f61c25b1133208ebfb31d10fdd2099e06e21c Mon Sep 17 00:00:00 2001 From: sajenim Date: Tue, 7 May 2024 20:44:34 +0800 Subject: [PATCH] incorporate email in home-manager --- .../features/desktop/common/default.nix | 1 + .../sajenim/features/desktop/common/email.nix | 118 ++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 home-manager/sajenim/features/desktop/common/email.nix diff --git a/home-manager/sajenim/features/desktop/common/default.nix b/home-manager/sajenim/features/desktop/common/default.nix index 0d83ccd..e4d71d6 100644 --- a/home-manager/sajenim/features/desktop/common/default.nix +++ b/home-manager/sajenim/features/desktop/common/default.nix @@ -3,6 +3,7 @@ { imports = [ ./discord + ./email.nix ./irc.nix ./mpd.nix ]; diff --git a/home-manager/sajenim/features/desktop/common/email.nix b/home-manager/sajenim/features/desktop/common/email.nix new file mode 100644 index 0000000..967b805 --- /dev/null +++ b/home-manager/sajenim/features/desktop/common/email.nix @@ -0,0 +1,118 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # protonmail-bridge requires password manager + pass + # encrypt and decrypt our email messages + protonmail-bridge + ]; + + accounts.email.accounts = { + primary = { + primary = true; + userName = "its.jassy@pm.me"; + realName = "Jasmine Wilson"; + address = "its.jassy@pm.me"; + imap = { + host = "127.0.0.1"; + port = 1143; + tls.useStartTls = true; + }; + smtp = { + host = "127.0.0.1"; + port = 1025; + tls.useStartTls = true; + }; + thunderbird.enable = true; + }; + + torrents = { + userName = "its.kalopsia@pm.me"; + realName = "Kalopsia"; + address = "its.kalopsia@pm.me"; + imap = { + host = "127.0.0.1"; + port = 1143; + tls.useStartTls = true; + }; + smtp = { + host = "127.0.0.1"; + port = 1025; + tls.useStartTls = true; + }; + thunderbird.enable = true; + }; + + sajkbd_primary = { + userName = "sajkbd@pm.me"; + realName = "Sajenim"; + address = "sajkbd@pm.me"; + imap = { + host = "127.0.0.1"; + port = 1143; + tls.useStartTls = true; + }; + smtp = { + host = "127.0.0.1"; + port = 1025; + tls.useStartTls = true; + }; + thunderbird.enable = true; + }; + + sajkbd_support = { + userName = "support@sajkbd.io"; + realName = "Sajenim"; + address = "support@sajkbd.io"; + imap = { + host = "127.0.0.1"; + port = 1143; + tls.useStartTls = true; + }; + smtp = { + host = "127.0.0.1"; + port = 1025; + tls.useStartTls = true; + }; + thunderbird.enable = true; + }; + + sajkbd_sales = { + userName = "sales@sajkbd.io"; + realName = "Sajenim"; + address = "sales@sajkbd.io"; + imap = { + host = "127.0.0.1"; + port = 1143; + tls.useStartTls = true; + }; + smtp = { + host = "127.0.0.1"; + port = 1025; + tls.useStartTls = true; + }; + thunderbird.enable = true; + }; + }; + + # Cross platform, decentralized, open-standard communication. + programs.thunderbird = { + enable = true; + profiles = { + proton.isDefault = true; + }; + }; + + home.persistence."/persist/home/sajenim" = { + directories = [ + # email configuration + ".config/protonmail" + # email cache of messages + ".local/share/protonmail" + # gpg encrypted passwords + ".password-store" + ]; + }; +} +