From 722ea91e1d40817dc9c025237d71b31004fb49e2 Mon Sep 17 00:00:00 2001 From: dish Date: Wed, 25 Mar 2026 16:08:15 -0400 Subject: [PATCH] [marvin] add JAVA_TOOL_OPTIONS to grimmory --- hosts/marvin/services/booklore.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hosts/marvin/services/booklore.nix b/hosts/marvin/services/booklore.nix index 81a90523..17949d04 100644 --- a/hosts/marvin/services/booklore.nix +++ b/hosts/marvin/services/booklore.nix @@ -16,6 +16,15 @@ let group = "booklore"; }; }; + + javaOptions = [ + "-XX:+UseShenandoahGC" + "-XX:ShenandoahGCHeuristics=compact" + "-XX:+UseCompactObjectHeaders" + "-XX:MaxRAMPercentage=20.0" + "-XX:InitialRAMPercentage=4.0" + "-XX:+ExitOnOutOfMemoryError" + ]; in { systemd = { @@ -50,7 +59,15 @@ in description = "Grimmory Server"; wantedBy = [ "multi-user.target" ]; after = [ "grimmory-db-proxy.service" ]; - path = [ pkgs.unrar-free ]; + # Required as binaries to use on the path + # unrar is used for working with CBX files(extensions .cbz, .cbr, .cb7), which are all comic books + # kepubify is used for converting EPUB files to KEPUB, or Kobo Enhanced EPUB + # ffmpeg is used for extracting metadata from audiobooks + path = [ + pkgs.unrar-free + pkgs.kepubify + pkgs.ffmpeg_7-headless + ]; environment = { BOOKLORE_PORT = toString d.port; TZ = "America/New_York"; @@ -59,6 +76,7 @@ in APP_PATH_CONFIG = "/var/lib/booklore/data"; APP_BOOKDROP_FOLDER = "/var/lib/booklore/bookdrop"; APP_VERSION = "v${self'.packages.grimmory.version}"; + JAVA_TOOL_OPTIONS = lib.concatStringsSep " " javaOptions; }; serviceConfig = { -- 2.51.2