81 lines
1.9 KiB
Nix
81 lines
1.9 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
tbPkg = if pkgs.stdenv.isDarwin then pkgs.thunderbird-bin else pkgs.thunderbird;
|
|
|
|
mkGmailAccount = address: realName: {
|
|
inherit address realName;
|
|
flavor = "gmail.com";
|
|
thunderbird.enable = true;
|
|
};
|
|
|
|
mkCalendar = collection: {
|
|
remote = {
|
|
type = "caldav";
|
|
url = "https://cloud.thiccdata.io/remote.php/dav/calendars/mbessette/${collection}/";
|
|
userName = "mbessette";
|
|
};
|
|
};
|
|
|
|
mkAddressBook = book: {
|
|
remote = {
|
|
type = "carddav";
|
|
url = "https://cloud.thiccdata.io/remote.php/dav/addressbooks/users/mbessette/${book}/";
|
|
userName = "mbessette";
|
|
};
|
|
thunderbird.enable = true;
|
|
};
|
|
in
|
|
{
|
|
programs.thunderbird = {
|
|
enable = true;
|
|
package = tbPkg;
|
|
|
|
profiles.default = {
|
|
isDefault = true;
|
|
accountsOrder = [ "personal" ];
|
|
};
|
|
};
|
|
|
|
accounts.calendar.basePath = ".calendars";
|
|
accounts.contact.basePath = ".contacts";
|
|
|
|
accounts.email.accounts = {
|
|
personal = mkGmailAccount "blade30912@gmail.com" "Matthew Bessette" // {
|
|
primary = true;
|
|
};
|
|
bessette = mkGmailAccount "bessette.matthew94@gmail.com" "Matthew Bessette";
|
|
house = mkGmailAccount "mbessette.house@gmail.com" "Matthew Bessette";
|
|
joseph = mkGmailAccount "joseph.lamothe55@gmail.com" "Joseph Lamothe";
|
|
};
|
|
|
|
accounts.calendar.accounts = {
|
|
family = mkCalendar "test" // {
|
|
thunderbird = {
|
|
enable = true;
|
|
color = "#FED3D9";
|
|
};
|
|
};
|
|
matt = mkCalendar "matt-calendar" // {
|
|
primary = true;
|
|
thunderbird = {
|
|
enable = true;
|
|
color = "#FDF0D7";
|
|
settings = id: {
|
|
"calendar.registry.${id}.imip.identity.key" =
|
|
"id_${builtins.hashString "sha256" "personal"}";
|
|
};
|
|
};
|
|
};
|
|
joseph-cal = mkCalendar "joseph-calendar" // {
|
|
thunderbird = {
|
|
enable = true;
|
|
color = "#CEF4F8";
|
|
};
|
|
};
|
|
};
|
|
|
|
accounts.contact.accounts = {
|
|
contacts = mkAddressBook "contacts";
|
|
};
|
|
}
|