mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 09:58:26 +00:00
Allo setting jvm arguments in nixos modules
This commit is contained in:
@ -35,6 +35,7 @@ in
|
|||||||
waitForTarget = "solr-init.target";
|
waitForTarget = "solr-init.target";
|
||||||
bind.address = "0.0.0.0";
|
bind.address = "0.0.0.0";
|
||||||
base-url = "http://localhost:7878";
|
base-url = "http://localhost:7878";
|
||||||
|
jvmArgs = [ "-J-Xmx2g" ];
|
||||||
inherit full-text-search;
|
inherit full-text-search;
|
||||||
};
|
};
|
||||||
services.docspell-restserver = {
|
services.docspell-restserver = {
|
||||||
@ -65,6 +66,8 @@ in
|
|||||||
pkgs.docspell.joex
|
pkgs.docspell.joex
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.telnet
|
pkgs.telnet
|
||||||
|
pkgs.htop
|
||||||
|
pkgs.openjdk
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,6 +214,12 @@ in {
|
|||||||
is running on the same machine.
|
is running on the same machine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
jvmArgs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [ "-J-Xmx1G" ];
|
||||||
|
description = "The options passed to the executable for setting jvm arguments.";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
app-id = mkOption {
|
app-id = mkOption {
|
||||||
@ -1199,7 +1205,8 @@ in {
|
|||||||
|
|
||||||
systemd.services.docspell-joex =
|
systemd.services.docspell-joex =
|
||||||
let
|
let
|
||||||
cmd = "${pkgs.docspell.joex}/bin/docspell-joex ${configFile}";
|
args = builtins.concatStringsSep " " cfg.jvmArgs;
|
||||||
|
cmd = "${pkgs.docspell.joex}/bin/docspell-joex ${args} -- ${configFile}";
|
||||||
waitTarget =
|
waitTarget =
|
||||||
if cfg.waitForTarget != null
|
if cfg.waitForTarget != null
|
||||||
then
|
then
|
||||||
|
@ -89,6 +89,13 @@ in {
|
|||||||
user is created.
|
user is created.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
jvmArgs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [ "-J-Xmx1G" ];
|
||||||
|
description = "The options passed to the executable for setting jvm arguments.";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
app-name = mkOption {
|
app-name = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -513,7 +520,8 @@ in {
|
|||||||
|
|
||||||
systemd.services.docspell-restserver =
|
systemd.services.docspell-restserver =
|
||||||
let
|
let
|
||||||
cmd = "${pkgs.docspell.server}/bin/docspell-restserver ${configFile}";
|
args = builtins.concatStringsSep " " cfg.jvmArgs;
|
||||||
|
cmd = "${pkgs.docspell.server}/bin/docspell-restserver ${args} -- ${configFile}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
description = "Docspell Rest Server";
|
description = "Docspell Rest Server";
|
||||||
|
Reference in New Issue
Block a user