fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1pkgs : 2{ config , lib , ...} : 3 4with lib ; 5 6{ 7options . alot = { 8sendMailCommand = mkOption { 9type = types . nullOr types . str ; 10description = '' 11Command to send a mail. If msmtp is enabled for the account, 12then this is set to 13{command}`msmtpq --read-envelope-from --read-recipients`. 14'' ; 15}; 16 17contactCompletion = mkOption { 18type = types . attrsOf types . str ; 19default = { 20type = "shellcommand" ; 21command = 22"' ${ pkgs . notmuch } /bin/notmuch address --format=json --output=recipients date:6M..'" ; 23regexp = "'\\[?{" + '' 24"name": "(?P<name>.*)", "address": "(?P<email>.+)", "name-addr": ".*"'' 25+ "}[,\\]]?'" ; 26shellcommand_external_filtering = "False" ; 27}; 28example = literalExpression '' 29{ 30type = "shellcommand"; 31command = "abook --mutt-query"; 32regexp = "'^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)'"; 33ignorecase = "True"; 34} 35'' ; 36description = '' 37Contact completion configuration as expected per alot. 38See [alot's wiki](http://alot.readthedocs.io/en/latest/configuration/contacts_completion.html) for 39explanation about possible values. 40'' ; 41}; 42 43extraConfig = mkOption { 44type = types . lines ; 45default = "" ; 46description = '' 47Extra settings to add to this Alot account configuration. 48'' ; 49}; 50}; 51 52config = mkIf config . notmuch . enable { 53alot . sendMailCommand = mkOptionDefault ( if config . msmtp . enable then 54"msmtpq --read-envelope-from --read-recipients" 55else 56null ); 57}; 58}