1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-18 07:49:48 +01:00

neomutt: add some options

Superficially, allow source primary account by default and show
default mailbox.
This commit is contained in:
Raito Bezarius 2022-08-14 01:37:46 +02:00 committed by Robert Helgesson
parent b1a5b3d6a5
commit 0184c8180f
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
2 changed files with 16 additions and 3 deletions

View file

@ -76,6 +76,12 @@ in {
'';
};
showDefaultMailbox = mkOption {
type = types.bool;
default = true;
description = "Show the default mailbox (INBOX)";
};
mailboxName = mkOption {
type = types.nullOr types.str;
default = null;

View file

@ -235,7 +235,8 @@ let
account.neomutt.extraMailboxes;
in with account; ''
# register account ${name}
${mailboxes} "${mailroot}/${folders.inbox}"
${optionalString account.neomutt.showDefaultMailbox
''${mailboxes} "${mailroot}/${folders.inbox}"''}
${extraMailboxes}
${hookName} ${mailroot}/ " \
source ${accountFilename account} "
@ -402,6 +403,11 @@ in {
default = true;
};
sourcePrimaryAccount =
mkEnableOption "source the primary account by default" // {
default = true;
};
unmailboxes = mkOption {
type = types.bool;
default = false;
@ -467,8 +473,9 @@ in {
''
}${concatMapStringsSep "\n" registerAccount neomuttAccounts}
${optionalString cfg.sourcePrimaryAccount ''
# Source primary account
source ${accountFilename primary}
source ${accountFilename primary}''}
# Extra configuration
${optionsStr cfg.settings}