This repository has no description
3.2 kB
110 lines
1{ self, ... }:
2{
3 perSystem =
4 {
5 pkgs,
6 lib,
7 system,
8 ...
9 }:
10 {
11 packages.notmuch =
12 let
13 # Mailboxes configuration from mail.nix
14 mailboxes = {
15 afra = [ "to:afra@afra-berlin.de" ];
16 c-base = [ "to:c-base.org" ];
17 coins = [
18 "to:btce@lassul.us"
19 "to:coinbase@lassul.us"
20 "to:polo@lassul.us"
21 "to:bitwala@lassul.us"
22 "to:payeer@lassul.us"
23 "to:gatehub@lassul.us"
24 "to:bitfinex@lassul.us"
25 "to:binance@lassul.us"
26 "to:bitcoin.de@lassul.us"
27 "to:robinhood@lassul.us"
28 ];
29 dezentrale = [ "to:dezentrale.space" ];
30 dhl = [ "to:dhl@lassul.us" ];
31 dn42 = [ "to:dn42@lists.nox.tf" ];
32 eloop = [ "to:eloop.org" ];
33 github = [ "to:github@lassul.us" ];
34 gmail = [
35 "to:gmail@lassul.us"
36 "to:lassulus@gmail.com"
37 "lassulus@googlemail.com"
38 ];
39 india = [
40 "to:hillhackers@lists.hillhacks.in"
41 "to:hackbeach@lists.hackbeach.in"
42 "to:hackbeach@mail.hackbeach.in"
43 ];
44 kaosstuff = [
45 "to:gearbest@lassul.us"
46 "to:banggood@lassul.us"
47 "to:tomtop@lassul.us"
48 ];
49 lugs = [ "to:lugs@lug-s.org" ];
50 meetup = [ "to:meetup@lassul.us" ];
51 nix = [
52 "to:nix-devel@googlegroups.com"
53 "to:nix@lassul.us"
54 ];
55 patreon = [ "to:patreon@lassul.us" ];
56 paypal = [ "to:paypal@lassul.us" ];
57 ptl = [ "to:ptl@posttenebraslab.ch" ];
58 retiolum = [ "to:lass@mors.r" ];
59 security = [
60 "to:seclists.org"
61 "to:bugtraq"
62 "to:securityfocus@lassul.us"
63 "to:security-announce@lists.apple.com"
64 ];
65 shack = [ "to:shackspace.de" ];
66 steam = [ "to:steam@lassul.us" ];
67 tinc = [
68 "to:tinc@tinc-vpn.org"
69 "to:tinc-devel@tinc-vpn.org"
70 ];
71 wireguard = [ "to:wireguard@lists.zx2c4" ];
72 zzz = [
73 "to:pizza@lassul.us"
74 "to:spam@krebsco.de"
75 ];
76 };
77
78 notmuchConfig = ''
79 [database]
80 path=Maildir
81 mail_root=Maildir
82
83 [user]
84 name=lassulus
85 primary_email=lassulus@lassul.us
86 other_email=lass@mors.r;${lib.concatStringsSep ";" (lib.flatten (lib.attrValues mailboxes))}
87
88 [new]
89 tags=unread;inbox;
90 ignore=
91
92 [search]
93 exclude_tags=deleted;spam;
94
95 [maildir]
96 synchronize_flags=true
97 '';
98
99 in
100 self.libWithPkgs.${pkgs.system}.makeWrapper pkgs.notmuch {
101 env = {
102 NOTMUCH_CONFIG = "${pkgs.writeText "notmuch-config" notmuchConfig}";
103 };
104 passthru = {
105 notmuchConfig = notmuchConfig;
106 mailboxes = mailboxes;
107 };
108 };
109 };
110}