{ config, lib, ... }: { options.services.searx = { extraDomains = lib.mkOption { type = lib.types.listOf lib.types.str; description = "extra domains that should be configured for searx"; default = []; }; }; config = lib.mkIf (config.services.searx.enable && config.services.reverseProxy.enable) { services.reverseProxy.services.searx = { target = "http://localhost:${toString config.services.searx.settings.server.port}"; domain = config.services.searx.domain; extraDomains = config.services.searx.extraDomains; settings = { forwardHeaders.enable = true; }; }; }; }