fork/home-manager
git clone https://git.julia.blue/fork/home-manager
0263da49
master
1{ config , lib , ...} : 2 3with lib ; 4 5let 6extraMailboxOptions = { 7options = { 8mailbox = mkOption { 9type = types . str ; 10example = "Sent" ; 11description = "Name of mailbox folder to be included" ; 12}; 13 14name = mkOption { 15type = types . nullOr types . str ; 16example = "Junk" ; 17default = null ; 18description = "Name to display" ; 19}; 20}; 21}; 22 23in { 24options . notmuch . neomutt = { 25enable = mkEnableOption "Notmuch support in NeoMutt" // { default = true ; }; 26 27virtualMailboxes = mkOption { 28type = types . listOf ( types . submodule ./notmuch-virtual-mailbox.nix ); 29example = [{ 30name = "My INBOX" ; 31query = "tag:inbox" ; 32}]; 33default = [{ 34name = "My INBOX" ; 35query = "tag:inbox" ; 36}]; 37description = "List of virtual mailboxes using Notmuch queries" ; 38}; 39}; 40 41options . neomutt = { 42enable = mkEnableOption "NeoMutt" ; 43 44sendMailCommand = mkOption { 45type = types . nullOr types . str ; 46default = if config . msmtp . enable then 47"msmtpq --read-envelope-from --read-recipients" 48else 49null ; 50defaultText = literalExpression '' 51if config.msmtp.enable then 52"msmtpq --read-envelope-from --read-recipients" 53else 54null 55'' ; 56example = "msmtpq --read-envelope-from --read-recipients" ; 57description = '' 58Command to send a mail. If not set, neomutt will be in charge of sending mails. 59'' ; 60}; 61 62extraConfig = mkOption { 63type = types . lines ; 64default = "" ; 65example = "color status cyan default" ; 66description = '' 67Extra lines to add to the folder hook for this account. 68'' ; 69}; 70 71mailboxName = mkOption { 72type = types . nullOr types . str ; 73default = null ; 74example = "==== <mailbox-name> ===" ; 75description = "Use a different name as mailbox name" ; 76}; 77 78extraMailboxes = mkOption { 79type = with types ; listOf ( either str ( submodule extraMailboxOptions )); 80default = [ ]; 81description = "List of extra mailboxes" ; 82}; 83}; 84}