fix searx configuration

This commit is contained in:
Michele Guerini Rocco 2021-06-18 18:20:05 +02:00
parent e4af5cfe15
commit e32598d618
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
2 changed files with 35 additions and 18 deletions

View File

@ -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@";
}
];
};
};

View File

@ -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;
});