Package: Add thunderbird.

This commit is contained in:
Dmitry Voronin 2025-01-09 17:42:06 +03:00
parent 5c952bcabc
commit 5f19ac8580
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
5 changed files with 176 additions and 37 deletions

View file

@ -11,7 +11,7 @@ let
cfg = config.home.nixos; cfg = config.home.nixos;
env = import ./env args; env = import ./env args;
file = import ./file args; file = import ./file args;
programs = import ./program args; program = import ./program args;
in in
{ {
imports = (util.ls <user>); imports = (util.ls <user>);
@ -34,6 +34,10 @@ in
acc acc
// { // {
${user.username} = { ${user.username} = {
accounts = import ./account args;
dconf.settings = util.catSet (util.ls ./file/dconf) args;
programs = with program; core // desktop;
xdg = import ./xdg { inherit (user) homeDirectory; };
home = { home = {
inherit (config.const) stateVersion; inherit (config.const) stateVersion;
inherit (env) sessionVariables; inherit (env) sessionVariables;
@ -43,9 +47,6 @@ in
# ISSUE: https://github.com/nix-community/home-manager/issues/5589 # ISSUE: https://github.com/nix-community/home-manager/issues/5589
extraActivationPath = with pkgs; [ openssh ]; extraActivationPath = with pkgs; [ openssh ];
}; };
xdg = import ./xdg { inherit (user) homeDirectory; };
programs = with programs; core // desktop;
dconf.settings = util.catSet (util.ls ./file/dconf) args;
}; };
} }
) { } cfg.users; ) { } cfg.users;

88
home/account/default.nix Normal file
View file

@ -0,0 +1,88 @@
{ ... }:
let
mkMail = cfg: cfg // { thunderbird.enable = true; };
mkHomeMail =
cfg:
mkMail (
cfg
// {
imap = {
host = "mail.voronind.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.voronind.com";
port = 465;
tls.enable = true;
};
}
);
mkHomeCalendar = {
remote = {
type = "caldav";
url = "https://dav.voronind.com";
userName = "voronind";
};
};
realName = "Dmitry Voronin";
in
{
email.accounts = {
Account = mkHomeMail {
inherit realName;
primary = true;
address = "account@voronind.com";
userName = "account@voronind.com";
};
Personal = mkHomeMail {
inherit realName;
address = "hi@voronind.com";
userName = "hi@voronind.com";
};
Admin = mkHomeMail {
inherit realName;
address = "admin@voronind.com";
userName = "admin@voronind.com";
};
Job = mkHomeMail {
inherit realName;
address = "job@voronind.com";
userName = "job@voronind.com";
};
Trash = mkHomeMail {
inherit realName;
address = "trash@voronind.com";
userName = "trash@voronind.com";
};
};
# ISSUE: https://github.com/nix-community/home-manager/issues/5775
calendar.accounts = {
default = mkHomeCalendar // {
primary = true;
};
family = mkHomeCalendar;
health = mkHomeCalendar;
high = mkHomeCalendar;
holiday = mkHomeCalendar;
low = mkHomeCalendar;
medium = mkHomeCalendar;
payment = mkHomeCalendar;
work = mkHomeCalendar;
};
# ISSUE: https://github.com/nix-community/home-manager/issues/5933
contact.accounts = {
Home = {
remote = {
type = "carddav";
url = "https://dav.voronind.com";
userName = "voronind";
};
};
};
}

View file

@ -30,5 +30,6 @@ in
desktop = { desktop = {
chromium = import ./chromium args; chromium = import ./chromium args;
firefox = import ./firefox args; firefox = import ./firefox args;
thunderbird = import ./thunderbird args;
}; };
} }

View file

@ -69,6 +69,14 @@ let
# (mkExtension "queryamoid@kaply.com" "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi") # (mkExtension "queryamoid@kaply.com" "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi")
]; ];
darkModeIgnore = [
"cloud.voronind.com"
"git.voronind.com"
"github.com"
"home.voronind.com"
"dav.voronind.com"
];
prefs = [ prefs = [
# WARN: Remove when Dark Reader policies gets merged. # WARN: Remove when Dark Reader policies gets merged.
(mkLockedPref "xpinstall.signatures.required" false) (mkLockedPref "xpinstall.signatures.required" false)
@ -111,35 +119,35 @@ let
]; ];
userChrome = '' userChrome = ''
* { * {
font-family: "${config.module.style.font.serif.name}" !important; font-family: "${config.module.style.font.serif.name}" !important;
font-size: ${toString config.module.style.font.size.application}pt !important; font-size: ${toString config.module.style.font.size.application}pt !important;
} }
''; '';
userContent = '' userContent = ''
@-moz-document url(about:home), url(about:newtab), url(about:privatebrowsing), url(about:blank) { @-moz-document url(about:home), url(about:newtab), url(about:privatebrowsing), url(about:blank) {
.click-target-container *, .top-sites-list * { .click-target-container *, .top-sites-list * {
color: #fff !important ; color: #fff !important ;
text-shadow: 2px 2px 2px #222 !important ; text-shadow: 2px 2px 2px #222 !important ;
} }
body::before { body::before {
content: "" ; content: "" ;
z-index: -1 ; z-index: -1 ;
position: fixed ; position: fixed ;
top: 0 ; top: 0 ;
left: 0 ; left: 0 ;
background: #f9a no-repeat url("${config.module.wallpaper.path}?raw=true") center ; background: #f9a no-repeat url("${config.module.wallpaper.path}?raw=true") center ;
background-color: #222; background-color: #222;
background-size: cover ; background-size: cover ;
/* filter: blur(4px) ; */ /* filter: blur(4px) ; */
width: 100vw ; width: 100vw ;
height: 100vh ; height: 100vh ;
} }
/* .logo { background-image: url("{repo}/logo.png?raw=true") !important; } */ /* .logo { background-image: url("{repo}/logo.png?raw=true") !important; } */
/* .logo { background-image: none !important; } */ /* .logo { background-image: none !important; } */
} }
''; '';
mkExtension = id: install_url: { mkExtension = id: install_url: {
${id} = { ${id} = {
@ -294,12 +302,7 @@ in
previewNewDesign = true; previewNewDesign = true;
syncSettings = true; syncSettings = true;
syncSitesFixes = false; syncSitesFixes = false;
disabledFor = [ disabledFor = darkModeIgnore;
"cloud.voronind.com"
"git.voronind.com"
"github.com"
"home.voronind.com"
];
theme = { theme = {
brightness = 100; brightness = 100;
contrast = 100; contrast = 100;

View file

@ -0,0 +1,46 @@
{ config, lib, ... }:
{
enable = true;
profiles.default = {
isDefault = true;
withExternalGnupg = true;
};
# ISSUE: https://github.com/nix-community/home-manager/issues/5775
# ISSUE: https://github.com/nix-community/home-manager/issues/5933
# settings =
# let
# safeName = builtins.replaceStrings [ "." ] [ "-" ];
#
# calendarAccounts = lib.mapAttrsToList (n: v: { n = v; }) config.home-manager.users.voronind.accounts.calendar.accounts;
# calendars = lib.foldAttrs (
# item: acc:
# let
# calendarAccountSafeName = safeName item.name;
# in
# acc
# // {
# "calendar.registry.${calendarAccountSafeName}.cache.enabled" = true;
# "calendar.registry.${calendarAccountSafeName}.calendar-main-default" = item.primary;
# "calendar.registry.${calendarAccountSafeName}.calendar-main-in-composite" = item.primary;
# "calendar.registry.${calendarAccountSafeName}.name" = item.name;
# "calendar.registry.${calendarAccountSafeName}.type" = "caldav";
# "calendar.registry.${calendarAccountSafeName}.uri" = item.remote.url;
# "calendar.registry.${calendarAccountSafeName}.username" = item.remote.userName;
# }
# ) { } calendarAccounts;
#
# contactsAccount = config.home-manager.users.voronind.accounts.contact.accounts.Home;
# contactsAccountSafeName = safeName contactsAccount.name;
# addressBookFilename = "abook-${contactsAccountSafeName}.sqlite";
# in
# calendars
# // {
# "ldap_2.servers.${contactsAccountSafeName}.carddav.url" = contactsAccount.remote.url;
# "ldap_2.servers.${contactsAccountSafeName}.carddav.username" = contactsAccount.remote.userName;
# "ldap_2.servers.${contactsAccountSafeName}.description" = contactsAccount.name;
# "ldap_2.servers.${contactsAccountSafeName}.dirType" = 102;
# "ldap_2.servers.${contactsAccountSafeName}.filename" = addressBookFilename;
# "mail.collect_addressbook" = "jscarddav://${addressBookFilename}";
# };
}