caesium: accounts and yubikey
This commit is contained in:
+19
-63
@@ -1,31 +1,12 @@
|
||||
{ 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
|
||||
{
|
||||
# Account definitions (email/calendar/contact) live in module.accounts.nix,
|
||||
# shared with evolution-data-server (module.evolution.nix). Only email
|
||||
# accounts opt in to Thunderbird; calendars and the address book are
|
||||
# consumed via GNOME/EDS instead, so Thunderbird is mail-only.
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
package = tbPkg;
|
||||
@@ -33,48 +14,23 @@ in
|
||||
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";
|
||||
settings = {
|
||||
"mail.chat.enabled" = false;
|
||||
"calendar.itip.showImipBar" = false;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
};
|
||||
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";
|
||||
# Hide the calendar/tasks/chat spaces so Thunderbird presents as an
|
||||
# email-only client. The address book space stays (local/collected
|
||||
# addresses + autocomplete still live there).
|
||||
userChrome = ''
|
||||
#calendarButton,
|
||||
#tasksButton,
|
||||
#chatButton {
|
||||
display: none !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user