neomutt: add some options
Superficially, allow source primary account by default and show default mailbox.
This commit is contained in:
parent
b1a5b3d6a5
commit
0184c8180f
|
@ -76,6 +76,12 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
showDefaultMailbox = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Show the default mailbox (INBOX)";
|
||||||
|
};
|
||||||
|
|
||||||
mailboxName = mkOption {
|
mailboxName = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
|
@ -235,7 +235,8 @@ let
|
||||||
account.neomutt.extraMailboxes;
|
account.neomutt.extraMailboxes;
|
||||||
in with account; ''
|
in with account; ''
|
||||||
# register account ${name}
|
# register account ${name}
|
||||||
${mailboxes} "${mailroot}/${folders.inbox}"
|
${optionalString account.neomutt.showDefaultMailbox
|
||||||
|
''${mailboxes} "${mailroot}/${folders.inbox}"''}
|
||||||
${extraMailboxes}
|
${extraMailboxes}
|
||||||
${hookName} ${mailroot}/ " \
|
${hookName} ${mailroot}/ " \
|
||||||
source ${accountFilename account} "
|
source ${accountFilename account} "
|
||||||
|
@ -402,6 +403,11 @@ in {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sourcePrimaryAccount =
|
||||||
|
mkEnableOption "source the primary account by default" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
unmailboxes = mkOption {
|
unmailboxes = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -467,8 +473,9 @@ in {
|
||||||
''
|
''
|
||||||
}${concatMapStringsSep "\n" registerAccount neomuttAccounts}
|
}${concatMapStringsSep "\n" registerAccount neomuttAccounts}
|
||||||
|
|
||||||
|
${optionalString cfg.sourcePrimaryAccount ''
|
||||||
# Source primary account
|
# Source primary account
|
||||||
source ${accountFilename primary}
|
source ${accountFilename primary}''}
|
||||||
|
|
||||||
# Extra configuration
|
# Extra configuration
|
||||||
${optionsStr cfg.settings}
|
${optionsStr cfg.settings}
|
||||||
|
|
Loading…
Reference in a new issue