File tree Expand file tree Collapse file tree 1 file changed +15
-28
lines changed
home/gabriel/features/productivity Expand file tree Collapse file tree 1 file changed +15
-28
lines changed Original file line number Diff line number Diff line change 2424 } ;
2525 } ;
2626
27+ commonChannelCfg = {
28+ Expunge = "Both" ; # Sync deleted messages
29+ Create = "Both" ; # Create mailboxes if needed
30+ Remove = "None" ; # Don't ever delete mailboxes
31+ SyncState = "*" ; # Ensure sync state is in mail dir
32+ } ;
33+
2734 gmail_channels = {
2835 Inbox = {
2936 farPattern = "INBOX" ;
3037 nearPattern = "Inbox" ;
31- extraConfig = {
32- Create = "Near" ;
33- Expunge = "Both" ;
34- } ;
38+ extraConfig = commonChannelCfg ;
3539 } ;
3640 Archive = {
3741 farPattern = "Archived Mail" ;
3842 nearPattern = "Archive" ;
39- extraConfig = {
40- Create = "Both" ;
41- Expunge = "Both" ;
42- } ;
43+ extraConfig = commonChannelCfg ;
4344 } ;
4445 Junk = {
4546 farPattern = "[Gmail]/Spam" ;
4647 nearPattern = "Junk" ;
47- extraConfig = {
48- Create = "Near" ;
49- Expunge = "Both" ;
50- } ;
48+ extraConfig = commonChannelCfg ;
5149 } ;
5250 Trash = {
5351 farPattern = "[Gmail]/Trash" ;
5452 nearPattern = "Trash" ;
55- extraConfig = {
56- Create = "Near" ;
57- Expunge = "Both" ;
58- } ;
53+ extraConfig = commonChannelCfg ;
5954 } ;
6055 Drafts = {
6156 farPattern = "[Gmail]/Drafts" ;
6257 nearPattern = "Drafts" ;
63- extraConfig = {
64- Create = "Near" ;
65- Expunge = "Both" ;
66- } ;
58+ extraConfig = commonChannelCfg ;
6759 } ;
6860 Sent = {
6961 farPattern = "[Gmail]/Sent Mail" ;
7062 nearPattern = "Sent" ;
71- extraConfig = {
72- Create = "Near" ;
73- Expunge = "Both" ;
74- } ;
63+ extraConfig = commonChannelCfg ;
7564 } ;
7665 } ;
7766in {
9685 imap . host = "mail.m7.rs" ;
9786 mbsync = {
9887 enable = true ;
99- create = "maildir" ;
100- expunge = "both" ;
88+ extraConfig . channel = commonChannelCfg ;
10189 } ;
10290 neomutt = {
10391 enable = true ;
125113
126114 mbsync = {
127115 enable = true ;
128- create = "maildir" ;
129- expunge = "both" ;
130116 groups . usp . channels = gmail_channels ;
117+ extraConfig . channel = commonChannelCfg ;
131118 extraConfig . account . AuthMechs = "XOAUTH2" ;
132119 } ;
133120 neomutt = {
You can’t perform that action at this time.
0 commit comments