From 3638b13d64dba2943506b5e999fd84e3b635a52e Mon Sep 17 00:00:00 2001 From: Lander Van den Bulcke Date: Thu, 21 Nov 2024 08:59:28 +0100 Subject: [PATCH] feat: enable thunderbird Signed-off-by: Lander Van den Bulcke --- home/lander/features/workstation/default.nix | 6 +- home/lander/features/workstation/mail.nix | 89 +++++++++++--------- home/lander/wodan.nix | 5 +- 3 files changed, 52 insertions(+), 48 deletions(-) diff --git a/home/lander/features/workstation/default.nix b/home/lander/features/workstation/default.nix index deb3556..87d1a27 100644 --- a/home/lander/features/workstation/default.nix +++ b/home/lander/features/workstation/default.nix @@ -1,8 +1,6 @@ -{ ... }: - -{ +{...}: { imports = [ ./alacritty.nix - ./mail.nix + #./mail.nix ]; } diff --git a/home/lander/features/workstation/mail.nix b/home/lander/features/workstation/mail.nix index a2b03c4..849fa94 100644 --- a/home/lander/features/workstation/mail.nix +++ b/home/lander/features/workstation/mail.nix @@ -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 + } + ''); + }; } diff --git a/home/lander/wodan.nix b/home/lander/wodan.nix index a795f5d..553fd67 100644 --- a/home/lander/wodan.nix +++ b/home/lander/wodan.nix @@ -1,7 +1,8 @@ -{ ... }: -{ +{...}: { imports = [ ./global ./features/workstation ]; + + programs.thunderbird.enable = true; }