feat: enable thunderbird

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2024-11-21 08:59:28 +01:00
parent 5a09de9644
commit 3638b13d64
Signed by: lander
GPG key ID: 0142722B4B0C536F
3 changed files with 52 additions and 48 deletions

View file

@ -1,8 +1,6 @@
{ ... }:
{
{...}: {
imports = [
./alacritty.nix
./mail.nix
#./mail.nix
];
}

View file

@ -1,8 +1,10 @@
# adapted from github:Misterio77/nix-config
{ pkgs, lib, config, ... }:
let
{
pkgs,
lib,
config,
...
}: let
mbsync = "$(config.programs.mbsync.package}/bin/mbsync";
common = rec {
@ -24,38 +26,40 @@ in {
accounts.email = {
maildirBasePath = "Mail";
accounts = {
inuits = rec {
primary = true;
address = "landervdb@inuits.eu";
passwordCommand = "cat ${config.sops.secrets.inuits-mail-pass.path}";
inuits =
rec {
primary = true;
address = "landervdb@inuits.eu";
passwordCommand = "cat ${config.sops.secrets.inuits-mail-pass.path}";
imap.host = "zimbra88.inuits.eu";
mbsync = {
enable = true;
create = "maildir";
expunge = "both";
};
folders = {
inbox = "Inbox";
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
neomutt = {
enable = true;
extraMailboxes = [
"Archive"
"Drafts"
"Junk"
"Sent"
"Trash"
];
};
imap.host = "zimbra88.inuits.eu";
mbsync = {
enable = true;
create = "maildir";
expunge = "both";
};
folders = {
inbox = "Inbox";
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
neomutt = {
enable = true;
extraMailboxes = [
"Archive"
"Drafts"
"Junk"
"Sent"
"Trash"
];
};
msmtp.enable = true;
smtp.host = "zimbra88.inuits.eu";
userName = "landervdb";
} // common;
msmtp.enable = true;
smtp.host = "zimbra88.inuits.eu";
userName = "landervdb";
}
// common;
};
};
@ -80,18 +84,19 @@ in {
OnUnitActiveSec = "5m";
};
Install = {
WantedBy = [ "timers.target" ];
WantedBy = ["timers.target"];
};
};
# run `createMaildir` after `linkGeneration`
home.activation = let
mbsyncAccounts = lib.filter (a: a.mbsync.enable) (lib.attrValues config.accounts.email.accounts);
in lib.mkIf (mbsyncAccounts != [ ]) {
createMaildir = lib.mkForce (lib.hm.dag.entryAfter [ "linkGeneration" ] ''
run mkdir -m700 -p $VERBOSE_ARG ${
lib.concatMapStringsSep " " (a: a.maildir.absPath) mbsyncAccounts
}
'');
};
in
lib.mkIf (mbsyncAccounts != []) {
createMaildir = lib.mkForce (lib.hm.dag.entryAfter ["linkGeneration"] ''
run mkdir -m700 -p $VERBOSE_ARG ${
lib.concatMapStringsSep " " (a: a.maildir.absPath) mbsyncAccounts
}
'');
};
}

View file

@ -1,7 +1,8 @@
{ ... }:
{
{...}: {
imports = [
./global
./features/workstation
];
programs.thunderbird.enable = true;
}