Replace hardcoded number by a config value

This commit is contained in:
Eike Kettner
2020-06-14 00:48:19 +02:00
parent 479a341b13
commit e15e2c9313
5 changed files with 31 additions and 5 deletions

View File

@ -13,6 +13,7 @@ let
app-name = "Docspell";
app-id = "rest1";
base-url = "http://localhost:7880";
max-item-page-size = 500;
bind = {
address = "localhost";
port = 7880;
@ -100,6 +101,18 @@ in {
'';
};
max-item-page-size = mkOption {
type = types.int;
default = defaults.max-item-page-size;
description = ''
This is a hard limit to restrict the size of a batch that is
returned when searching for items. The user can set this limit
within the client config, but it is restricted by the server to
the number defined here. An admin might choose a lower number
depending on the available resources.
'';
};
bind = mkOption {
type = types.submodule({
options = {