diff --git a/configuration.nix b/configuration.nix index b87d97c..729aed0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -284,35 +284,42 @@ uwsgiConfig = { disable-logging = true; - # serve via uwsgi unix socket + # serve using the uwsgi protocol socket = "/run/searx/uwsgi.sock"; chmod-socket = "660"; - # mount app on non-root url /srx - manage-script-name = true; + # use /searx as url "mountpoint" + mount = "/srx=searx.webapp:application"; module = ""; - mount = "/srx=searx.webapp:application"; + manage-script-name = true; + + # caching + cache2 = lib.concatStringsSep "," + [ "name=searxcache" + "items=2000" + "blocks=2000" + "blocksize=4096" + "bitmap=1" + ]; }; settings = { general.instance_name = "searxwell"; - server.base_url = "https://${config.var.hostname}/srx/"; + server.base_url = "https://${config.var.hostname}/"; + server.secret_key = "@SEARX_SECRET@"; # Replace DOI links with Sci-Hub - doi_resolvers."sci-hub.se" = "https://sci-hub.se/"; - default_doi_resolver = "sci-hub.se"; + default_doi_resolver = "sci-hub.st"; - # Use authenticated APIs for some services - engines = { - wolframalpha = - { api_key = "@WOLFRAM_API_KEY@"; - engine = "wolframalpha_api"; - }; - youtube = - { api_key = "@YOUTUBE_API_KEY@"; - engine = "youtube_api"; - }; - }; + ## Use authenticated APIs for some services + engines = [ + { name = "wolframalpha"; + api_key = "@WOLFRAM_API_KEY@"; + } + { name = "youtube"; + api_key = "@YOUTUBE_API_KEY@"; + } + ]; }; }; diff --git a/packages.nix b/packages.nix index c3b07e3..28aacb7 100644 --- a/packages.nix +++ b/packages.nix @@ -13,6 +13,16 @@ in authToken = config.secrets.passwords.matrix; }; + searx = super.searx.overrideAttrs (old: { + patches = [ + # Fix a crash, remove with the next update + (self.fetchpatch { + url = "https://github.com/searx/searx/commit/9c10b150963babb7f0b52081693a42b2e61eede9.patch"; + sha256 = "0svp8799628wja2hq59da6rxqi99am8p6hb8y27ciwzsjz0wwba7"; + }) + ]; + }); + monero = unstable.monero; element-web = unstable.element-web; });