summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorAntoine Eiche <lewo@abesis.fr>2021-03-11 20:53:38 +0100
committerAntoine Eiche <lewo@abesis.fr>2021-04-07 22:22:38 +0200
commit93330c54531e494eed603a389b3c297a2834676b (patch)
tree86093fad15e97b0879465680ae3d9770adfd1012 /default.nix
parent66e8baa6f27581ae28678917f67ed2750842c14a (diff)
Move indexDir option to the mailserver scopelewo/indexDir
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.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix28
1 files changed, 20 insertions, 8 deletions
diff --git a/default.nix b/default.nix
index 21c38e3..8905c5a 100644
--- a/default.nix
+++ b/default.nix
@@ -187,17 +187,29 @@ in
default = {};
};
+ indexDir = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ Folder to store search indices. If null, indices are stored
+ along with email, which could not necessarily be desirable,
+ especially when the fullTextSearch option is enable since
+ indices it creates are voluminous and do not need to be backed
+ up.
+
+ Be careful when changing this option value since all indices
+ would be recreated at the new location (and clients would need
+ to resynchronize).
+
+ Note the some variables can be used in the file path. See
+ https://doc.dovecot.org/configuration_manual/mail_location/#variables
+ for details.
+ '';
+ example = "/var/lib/docecot/indices/%d/%n";
+ };
fullTextSearch = {
enable = mkEnableOption "Full text search indexing with xapian. This has significant performance and disk space cost.";
- indexDir = mkOption {
- type = types.nullOr types.str;
- default = "/var/lib/dovecot/fts_xapian";
- description = ''
- Folder to store search indices. If null, indices are stored along with email, which
- is not necessarily desirable as indices are voluminous and do not need to be backed up.
- '';
- };
autoIndex = mkOption {
type = types.bool;
default = true;