fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . afew ; 8 9in { 10options . programs . afew = { 11enable = mkEnableOption "the afew initial tagging script for Notmuch" ; 12 13extraConfig = mkOption { 14type = types . lines ; 15default = '' 16[SpamFilter] 17[KillThreadsFilter] 18[ListMailsFilter] 19[ArchiveSentMailsFilter] 20[InboxFilter] 21'' ; 22example = '' 23[SpamFilter] 24 25[Filter.0] 26query = from:pointyheaded@boss.com 27tags = -new;+boss 28message = Message from above 29 30[InboxFilter] 31'' ; 32description = '' 33Extra lines added to afew configuration file. Available 34configuration options are described in the afew manual: 35<https://afew.readthedocs.io/en/latest/configuration.html>. 36'' ; 37}; 38}; 39 40config = mkIf cfg . enable { 41home . packages = [ pkgs . afew ]; 42 43xdg . configFile . "afew/config" . text = '' 44# Generated by Home Manager. 45# See https://afew.readthedocs.io/ 46 47${ cfg . extraConfig } 48'' ; 49}; 50}