neomutt: make folder change when sourcing account optional
This adds an option for disabling setting the folder when sourcing accounts in neomutt.
This commit is contained in:
parent
cdc774f337
commit
225bf275ba
4 changed files with 70 additions and 3 deletions
|
|
@ -124,9 +124,10 @@ let
|
|||
genMaildirAccountConfig = account:
|
||||
with account;
|
||||
let
|
||||
folderHook = mapAttrsToList setOption (genCommonFolderHooks account // {
|
||||
folder = "'${account.maildir.absPath}'";
|
||||
});
|
||||
folderHook = mapAttrsToList setOption (genCommonFolderHooks account
|
||||
// optionalAttrs cfg.changeFolderWhenSourcingAccount {
|
||||
folder = "'${account.maildir.absPath}'";
|
||||
});
|
||||
in ''
|
||||
${concatStringsSep "\n" folderHook}
|
||||
'';
|
||||
|
|
@ -266,6 +267,11 @@ in {
|
|||
description = "Extra configuration appended to the end.";
|
||||
};
|
||||
|
||||
changeFolderWhenSourcingAccount =
|
||||
mkEnableOption "changing the folder when sourcing an account" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue