Move indexDir option to the mailserver scope

This option has been initially in the mailserver.fullTextSearch
scope. However, this option modifies the location of all index files
of dovecot and not only those used by the full text search feature. It
is then more relevant to have this option in the mailserver top level
scope.

Moreover, the default option has been changed to null in order to keep
existing index files where they are: changing the index location means
recreating all index files. The fts documentation however recommend to
change this default location when enabling the fts feature.
This commit is contained in:
Antoine Eiche 2021-03-11 20:53:38 +01:00
parent 66e8baa6f2
commit 93330c5453
4 changed files with 34 additions and 17 deletions

View file

@ -59,9 +59,7 @@ in
preStart = let
directories = lib.strings.escapeShellArgs (
[ mailDirectory ]
++ lib.optional
(cfg.fullTextSearch.enable && (cfg.fullTextSearch.indexDir != null))
cfg.fullTextSearch.indexDir
++ lib.optional (cfg.indexDir != null) cfg.indexDir
);
in ''
# Create mail directory and set permissions. See