Initial commit
This commit is contained in:
84
modules/features/email.nix
Normal file
84
modules/features/email.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{ den, lib, ... }:
|
||||
{
|
||||
lux.email = den.lib.perUser (
|
||||
{ user, ... }:
|
||||
let
|
||||
mkEmailAccount =
|
||||
_: email:
|
||||
{
|
||||
enable = true;
|
||||
address = email.address;
|
||||
primary = email.primary;
|
||||
realName = user.realName;
|
||||
userName = email.address;
|
||||
thunderbird =
|
||||
{
|
||||
enable = true;
|
||||
}
|
||||
// lib.optionalAttrs (email.kind == "office365") {
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
}
|
||||
// (
|
||||
if email.kind == "mxrouting" then
|
||||
{
|
||||
imap = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
flavor = "outlook.office365.com";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
homeManager = { ... }: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.${user.name} = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
settings = {
|
||||
# LAYOUT: Force 3-Pane Vertical View (Folders | List | Message)
|
||||
"mail.ui.display.message_pane_vertical" = true;
|
||||
|
||||
# APPEARANCE: Enable "Cards View" (modern multi-line list)
|
||||
# Note: 'cards' is the value for the new view
|
||||
"mail.ui.display.thread_pane_view_type" = "cards";
|
||||
|
||||
# DENSITY: "Compact" is usually cleaner for tech-savvy users
|
||||
"mail.uidensity" = 1; # 0=Default, 1=Compact, 2=Touch
|
||||
|
||||
# PRIVACY & CLEANUP
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"mail.server.server2.hidden" = true; # Hide "Local Folders"
|
||||
|
||||
# Start page disable for faster boot
|
||||
"mailnews.start_page.enabled" = false;
|
||||
|
||||
# Disable the "Get a new email address" feature in account manager
|
||||
"mail.provider.enabled" = false;
|
||||
|
||||
"layout.css.devPixelsPerPx" = 0.85;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email.accounts = lib.mapAttrs mkEmailAccount user.emails;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user