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 = {