From b94de95f9d82cc61f93b4652cff53ec3d14d2fb1 Mon Sep 17 00:00:00 2001 From: DCsunset Date: Sat, 24 Aug 2024 16:41:53 +0000 Subject: [PATCH] nixos/stirling-pdf: make calibre dependency optional based on config --- .../services/web-apps/stirling-pdf.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/web-apps/stirling-pdf.nix b/nixos/modules/services/web-apps/stirling-pdf.nix index cd8638aff14d..ea7d7fbf54e5 100644 --- a/nixos/modules/services/web-apps/stirling-pdf.nix +++ b/nixos/modules/services/web-apps/stirling-pdf.nix @@ -47,18 +47,20 @@ in environment = lib.mapAttrs (_: toString) cfg.environment; # following https://github.com/Stirling-Tools/Stirling-PDF#locally - path = with pkgs; [ - unpaper - libreoffice - ocrmypdf - poppler_utils - unoconv - opencv - pngquant - tesseract - python3Packages.weasyprint - calibre - ]; + path = + with pkgs; + [ + unpaper + libreoffice + ocrmypdf + poppler_utils + unoconv + opencv + pngquant + tesseract + python3Packages.weasyprint + ] + ++ lib.optional (cfg.environment.INSTALL_BOOK_AND_ADVANCED_HTML_OPS or "false" == "true") calibre; wantedBy = [ "multi-user.target" ];