2023-02-24 16:16:15 +02:00
|
|
|
{ config, depot, lib, tools, ... }:
|
2022-05-25 12:11:10 +03:00
|
|
|
let
|
2022-06-18 03:44:51 +03:00
|
|
|
inherit (config) links;
|
2022-05-25 12:11:10 +03:00
|
|
|
in
|
|
|
|
{
|
2023-05-13 23:52:35 +03:00
|
|
|
imports = [
|
|
|
|
./proxy-shuffle.nix
|
|
|
|
];
|
2022-06-18 03:44:51 +03:00
|
|
|
links.searxng.protocol = "http";
|
2022-05-25 12:11:10 +03:00
|
|
|
|
2023-06-05 01:54:23 +03:00
|
|
|
age.secrets.searxng-secrets.file = ../../../secrets/searxng-secrets.age;
|
2022-05-25 12:11:10 +03:00
|
|
|
services.searx = {
|
|
|
|
enable = true;
|
|
|
|
runInUwsgi = true;
|
2023-02-24 16:16:15 +02:00
|
|
|
package = depot.packages.searxng;
|
2022-05-25 12:11:10 +03:00
|
|
|
environmentFile = config.age.secrets.searxng-secrets.path;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
secret_key = "@SEARXNG_SECRET@";
|
|
|
|
};
|
2022-06-22 19:39:01 +03:00
|
|
|
search.formats = [
|
|
|
|
"html"
|
|
|
|
"json"
|
|
|
|
];
|
2022-05-26 20:14:25 +03:00
|
|
|
engines = [
|
|
|
|
{ name = "bing"; disabled = true; }
|
|
|
|
{ name = "brave"; disabled = true; }
|
|
|
|
];
|
2022-05-26 21:16:24 +03:00
|
|
|
ui.theme_args.simple_style = "dark";
|
2022-05-26 19:12:01 +03:00
|
|
|
outgoing.proxies = rec {
|
|
|
|
http = [
|
2023-05-13 22:42:45 +03:00
|
|
|
"socks5://se-got-wg-socks5-001.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-010.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-014.relays.mullvad.net:1080"
|
|
|
|
"socks5://ch-zrh-wg-socks5-005.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-mma-wg-socks5-001.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-mma-wg-socks5-101.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-mma-wg-socks5-102.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-mma-wg-socks5-103.relays.mullvad.net:1080"
|
|
|
|
"socks5://ch-zrh-wg-socks5-002.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-004.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-got-wg-socks5-003.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-006.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-008.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-sto-wg-socks5-001.relays.mullvad.net:1080"
|
|
|
|
"socks5://se-mma-wg-socks5-004.relays.mullvad.net:1080"
|
2022-05-26 19:12:01 +03:00
|
|
|
];
|
|
|
|
https = http;
|
|
|
|
};
|
2022-05-25 12:11:10 +03:00
|
|
|
};
|
|
|
|
uwsgiConfig = {
|
2022-06-18 03:44:51 +03:00
|
|
|
http = links.searxng.tuple;
|
2022-05-25 12:11:10 +03:00
|
|
|
cache2 = "name=searxcache,items=2000,blocks=2000,blocksize=65536,bitmap=1";
|
|
|
|
buffer-size = 65536;
|
|
|
|
env = ["SEARXNG_SETTINGS_PATH=/run/searx/settings.yml"];
|
2022-05-25 21:45:08 +03:00
|
|
|
disable-logging = true;
|
2022-05-25 12:11:10 +03:00
|
|
|
};
|
|
|
|
};
|
2022-06-18 03:44:51 +03:00
|
|
|
services.nginx.virtualHosts."search.${tools.meta.domain}" = lib.recursiveUpdate (tools.nginx.vhosts.proxy links.searxng.url) {
|
2022-05-25 21:45:08 +03:00
|
|
|
extraConfig = "access_log off;";
|
|
|
|
};
|
2022-12-28 19:59:59 +02:00
|
|
|
systemd.services.uwsgi.after = [ "wireguard-wgmv.service" "network-addresses-wgmv.service" ];
|
2022-05-25 12:11:10 +03:00
|
|
|
}
|