diff options
author | Karel Kočí <cynerd@email.cz> | 2024-05-23 10:32:17 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2024-05-23 10:32:17 +0200 |
commit | 6b0671b361b235bf02d423f2448b81fb60bbd2bb (patch) | |
tree | b062e9507a7e2dec1b590dfd9a788c4e4eeed0f1 /nixos | |
parent | 900dca47135dc98cac6eea1922acd346e4e911ff (diff) | |
download | nixos-personal-6b0671b361b235bf02d423f2448b81fb60bbd2bb.tar.gz nixos-personal-6b0671b361b235bf02d423f2448b81fb60bbd2bb.tar.bz2 nixos-personal-6b0671b361b235bf02d423f2448b81fb60bbd2bb.zip |
nixos/lipwig: Add SearXNG
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/configurations/lipwig.nix | 87 |
1 files changed, 86 insertions, 1 deletions
diff --git a/nixos/configurations/lipwig.nix b/nixos/configurations/lipwig.nix index 8b1f3ee..8e372c6 100644 --- a/nixos/configurations/lipwig.nix +++ b/nixos/configurations/lipwig.nix @@ -124,6 +124,14 @@ proxyWebsockets = true; }; }; + "searx.cynerd.cz" = { + forceSSL = true; + useACMEHost = "cynerd.cz"; + locations."/".extraConfig = '' + uwsgi_pass "unix:///run/searx/searx.sock"; + include ${config.services.nginx.package}/conf/uwsgi_params; + ''; + }; }; }; services.fcgiwrap = { @@ -134,9 +142,10 @@ acceptTerms = true; defaults.email = "cynerd+acme@email.cz"; certs."cynerd.cz".extraDomainNames = [ - "git.cynerd.cz" "cloud.cynerd.cz" + "git.cynerd.cz" "grafana.cynerd.cz" + "searx.cynerd.cz" ]; }; @@ -267,6 +276,82 @@ ensureDatabases = ["nextcloud"]; }; + # SearX #################################################################### + services.searx = { + enable = true; + environmentFile = "/run/secrets/searx.env"; + settings = { + server.secret_key = "@SEARX_SECRET_KEY@"; + search = { + autocomplete = "google"; + autocomplete_min = 2; + }; + ui = { + query_in_title = true; + infinite_scroll = true; + center_alignment = true; + hotkeys = "vim"; + }; + engines = [ + { + name = "seznam"; + disabled = false; + } + { + name = "material icons"; + disabled = false; + } + { + name = "svgrepo"; + disabled = false; + } + { + name = "peertube"; + disabled = false; + } + { + name = "lib.rs"; + disabled = false; + } + { + name = "gitlab"; + disabled = false; + } + { + name = "sourcehut"; + disabled = false; + } + { + name = "free software directory"; + disabled = false; + } + { + name = "cppreference"; + disabled = false; + } + { + name = "searchcode code"; + disabled = false; + } + { + name = "imdb"; + disabled = false; + } + { + name = "tmdb"; + disabled = false; + } + ]; + }; + runInUwsgi = true; + uwsgiConfig = { + socket = "/run/searx/searx.sock"; + chmod-socket = "660"; + }; + redisCreateLocally = true; + }; + users.groups.searx.members = ["nginx"]; + # Old Syncthing ############################################################ services.syncthing = { enable = true; |