split email accounts
This commit is contained in:
parent
a6b6ed3bc7
commit
e21c306269
@ -672,15 +672,11 @@
|
||||
:straight t
|
||||
:bind (("C-c m" . notmuch-hello))
|
||||
:custom
|
||||
(notmuch-search-oldest-first nil)
|
||||
(notmuch-saved-searches
|
||||
'((:name "inbox (personal)" :query "tag:inbox AND tag:personal")
|
||||
(:name "unread (personal)" :query "tag:unread AND tag:personal")
|
||||
(:name "sent (personal)" :query "tag:sent AND tag:personal")
|
||||
(:name "all mail (personal)" :query "tag:personal")
|
||||
(:name "inbox (work)" :query "tag:inbox AND tag:work")
|
||||
(:name "unread (work)" :query "tag:unread AND tag:work")
|
||||
(:name "sent (work)" :query "tag:sent AND tag:work")
|
||||
(:name "all mail (work)" :query "tag:work")
|
||||
'((:name "inbox" :query "tag:inbox")
|
||||
(:name "unread" :query "tag:unread")
|
||||
(:name "sent" :query "tag:sent")
|
||||
(:name "drafts" :query "tag:draft")))
|
||||
:init
|
||||
(add-hook 'message-send-hook (lambda ()
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
@ -23,21 +24,6 @@
|
||||
programs = {
|
||||
aerc = {
|
||||
enable = true;
|
||||
templates = {
|
||||
thanks = ''
|
||||
Thanks!
|
||||
|
||||
{{exec "{ git remote get-url --push origin; git reflog -2 origin/master --pretty=format:%h | xargs printf '%s\n' | tac; } | xargs printf 'To %s\n %s..%s master -> master'" ""}}
|
||||
'';
|
||||
};
|
||||
# extraBinds = {
|
||||
# messages = {
|
||||
# ga = ":flag<Enter>:pipe -mb git am -3<Enter>";
|
||||
# gp = ":term git push<Enter>";
|
||||
# gl = ":term git log<Enter>";
|
||||
# rt = ":reply -a -Tthanks<Enter>";
|
||||
# };
|
||||
# };
|
||||
extraConfig = {
|
||||
ui = {
|
||||
sort = "-r arrival";
|
||||
@ -50,7 +36,7 @@
|
||||
unsafe-accounts-conf = true;
|
||||
};
|
||||
compose = {
|
||||
address-book-cmd = "khard email --parsable --remove-first-line %s";
|
||||
address-book-cmd = "notmuch address \"%s\"";
|
||||
};
|
||||
filters = {
|
||||
"text/plain" = "colorize";
|
||||
@ -65,27 +51,6 @@
|
||||
mbsync = {
|
||||
enable = true;
|
||||
};
|
||||
notmuch = {
|
||||
enable = true;
|
||||
new.tags = [ "new" ];
|
||||
hooks = {
|
||||
postNew = ''
|
||||
notmuch tag +personal "path:personal/**"
|
||||
notmuch tag +work "path:work/**"
|
||||
|
||||
notmuch tag +sent -new tag:new from:michael@michaelthomson.dev
|
||||
notmuch tag +sent -new tag:new from:mthomson@konradgroup.com
|
||||
|
||||
notmuch tag +cal attachment:.ics
|
||||
|
||||
notmuch tag +inbox +unread -new "tag:new"
|
||||
'';
|
||||
preNew = ''
|
||||
mbsync -a
|
||||
(cd ~/Maildir/work/ && gmi sync)
|
||||
'';
|
||||
};
|
||||
};
|
||||
lieer = {
|
||||
enable = true;
|
||||
};
|
||||
@ -103,7 +68,74 @@
|
||||
};
|
||||
};
|
||||
|
||||
accounts = {
|
||||
programs.notmuch = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
new.tags = [ "new" ];
|
||||
}
|
||||
(lib.mkIf (osConfig.networking.hostName == "macbook") {
|
||||
hooks = {
|
||||
postNew = ''
|
||||
notmuch tag +sent -new tag:new from:mthomson@konradgroup.com
|
||||
|
||||
notmuch tag +cal attachment:.ics
|
||||
|
||||
notmuch tag +inbox +unread -new "tag:new"
|
||||
'';
|
||||
preNew = ''
|
||||
cd ~/Maildir/work/ && gmi sync
|
||||
'';
|
||||
};
|
||||
})
|
||||
(lib.mkIf (osConfig.networking.hostName != "macbook") {
|
||||
hooks = {
|
||||
postNew = ''
|
||||
notmuch tag +sent -new tag:new from:michael@michaelthomson.dev
|
||||
|
||||
notmuch tag +cal attachment:.ics
|
||||
|
||||
notmuch tag +inbox +unread -new "tag:new"
|
||||
'';
|
||||
preNew = ''
|
||||
mbsync -a
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
accounts = lib.mkMerge [
|
||||
(lib.mkIf (osConfig.networking.hostName == "macbook") {
|
||||
email = {
|
||||
accounts.work = {
|
||||
primary = true;
|
||||
flavor = "gmail.com";
|
||||
address = "mthomson@konradgroup.com";
|
||||
realName = "Michael Thomson";
|
||||
aerc = {
|
||||
enable = true;
|
||||
# extraBinds = {
|
||||
# messages = {
|
||||
# md = ":modify-labels +trash<Enter>";
|
||||
# };
|
||||
# };
|
||||
extraAccounts = {
|
||||
source = "maildir://~/Maildir/work";
|
||||
};
|
||||
};
|
||||
notmuch = {
|
||||
enable = true;
|
||||
};
|
||||
lieer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
replace_slash_with_dot = true;
|
||||
ignore_tags = [ "new" "personal" "work" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (osConfig.networking.hostName != "macbook") {
|
||||
email = {
|
||||
accounts.personal = {
|
||||
primary = true;
|
||||
@ -143,25 +175,6 @@
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
accounts.work = {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "mthomson@konradgroup.com";
|
||||
realName = "Michael Thomson";
|
||||
aerc = {
|
||||
enable = true;
|
||||
};
|
||||
notmuch = {
|
||||
enable = true;
|
||||
};
|
||||
lieer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
replace_slash_with_dot = true;
|
||||
ignore_tags = [ "new" "personal" "work" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
calendar = {
|
||||
basePath = ".calendar";
|
||||
@ -221,5 +234,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user