{ config, lib, pkgs, ... }: { options.snowflake.services.gotenberg = { enable = lib.mkEnableOption "enable gotenberg"; }; config = lib.mkIf config.snowflake.services.gotenberg.enable { # gottenberg systemctl service is failing for some reason # running the Exec function manually works, however the service fails # need to debug deeper services.gotenberg = { enable = true; port = 3000; chromium.package = pkgs.ungoogled-chromium; chromium.disableJavascript = true; libreoffice.package = pkgs.libreoffice; logLevel = "debug"; # this doesn't work: https://github.com/NixOS/nixpkgs/issues/340447 extraArgs = [ "--chromium-allow-list=file:///tmp/.*" ]; }; environment.systemPackages = with pkgs; [ ungoogled-chromium libreoffice ]; }; }