infra/hosts/nachtigall/apps/searx.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
2.1 KiB
Nix
Raw Normal View History

2023-10-29 14:34:25 +00:00
{ flake
, config
, lib
, pkgs
, ...
}:
{
age.secrets.searx-environment = {
file = "${flake.self}/secrets/searx-environment.age";
mode = "600";
2023-10-29 14:34:25 +00:00
};
services.nginx.virtualHosts."search.pub.solar" = {
enableACME = true;
forceSSL = true;
2023-10-29 22:49:45 +00:00
locations."/".extraConfig = ''
uwsgi_pass unix:/run/searx/searx.sock;
'';
2023-10-29 14:34:25 +00:00
};
users.users.nginx.extraGroups = [ "searx" ];
services.searx = {
enable = true;
2023-10-29 22:49:45 +00:00
package = pkgs.searxng;
2023-10-29 14:34:25 +00:00
runInUwsgi = true;
uwsgiConfig = {
2023-10-29 22:51:28 +00:00
disable-logging = true;
2023-10-29 14:34:25 +00:00
socket = "/run/searx/searx.sock";
chmod-socket = "660";
};
environmentFile = config.age.secrets.searx-environment.path;
settings = {
2023-10-29 22:49:45 +00:00
use_default_settings = true;
server = {
base_url = "https://search.pub.solar";
secret_key = "@SEARX_SECRET_KEY@";
};
2023-10-29 14:34:25 +00:00
general = {
2023-10-29 22:49:45 +00:00
debug = false;
2023-10-29 14:34:25 +00:00
instance_name = "search.pub.solar";
2023-10-29 22:49:45 +00:00
privacypolicy_url = "https://pub.solar/privacy";
2023-10-29 14:34:25 +00:00
# use true to use your own donation page written in searx/info/en/donate.md
# use false to disable the donation link
2023-10-29 22:49:45 +00:00
donation_url = false;
2023-10-29 14:34:25 +00:00
# mailto:contact@example.com
2023-10-29 22:49:45 +00:00
contact_url = false;
enable_metrics = false;
2023-10-29 14:34:25 +00:00
};
search = {
# Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "yandex", "mwmbl",
# "seznam", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off
# by default.
2023-10-29 22:49:45 +00:00
autocomplete = "duckduckgo";
2023-10-29 14:34:25 +00:00
# minimun characters to type before autocompleter starts
2023-10-29 22:49:45 +00:00
autocomplete_min = 4;
2023-10-29 14:34:25 +00:00
};
2023-10-29 22:49:45 +00:00
engine = [
{ engine = "startpage"; disabled = false; }
{ engine = "yahoo"; disabled = false; }
{ engine = "tagesschau"; disabled = false; }
];
2023-10-29 14:34:25 +00:00
ui = {
# query_in_title: When true, the result page's titles contains the query
# it decreases the privacy, since the browser can records the page titles.
query_in_title = false;
# infinite_scroll: When true, automatically loads the next page when scrolling to bottom of the current page.
2023-10-29 21:14:13 +00:00
infinite_scroll = true;
2023-10-29 14:34:25 +00:00
};
};
};
}