mirror of
https://github.com/kmein/niveum
synced 2026-03-22 04:41:07 +01:00
feat(mail): remove afew
This commit is contained in:
@@ -117,29 +117,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
new.tags = [ "new" ];
|
new.tags = [ "new" ];
|
||||||
search.excludeTags = [ "deleted" "spam" ];
|
search.excludeTags = [ "deleted" "spam" ];
|
||||||
hooks.postNew = "${pkgs.afew}/bin/afew --tag --new";
|
hooks.postNew = generateTaggingScript tagRules;
|
||||||
};
|
|
||||||
|
|
||||||
programs.afew = let
|
|
||||||
generateFilters = rules:
|
|
||||||
lib.concatStringsSep "\n" (lib.lists.imap1
|
|
||||||
(index: {message ? null, query, tags}: ''
|
|
||||||
[Filter.${toString index}]
|
|
||||||
query = ${query}
|
|
||||||
tags = ${lib.concatStringsSep ";" tags}
|
|
||||||
${lib.optionalString (message != null) "message = ${message}"}
|
|
||||||
'')
|
|
||||||
rules
|
|
||||||
);
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
[SpamFilter]
|
|
||||||
|
|
||||||
${generateFilters tagRules}
|
|
||||||
|
|
||||||
[InboxFilter]
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
|
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
|
||||||
|
|||||||
Reference in New Issue
Block a user