feat: add searxng service
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e7accbd7bd
commit
17886d1355
7 changed files with 97 additions and 5 deletions
|
@ -60,6 +60,7 @@ in {
|
|||
"Vaultwarden" = mkPublicReverseProxy "vault" "${nosIP}:8781" {};
|
||||
"Hauk" = mkPublicReverseProxy "hauk" "${nosIP}:3003" {};
|
||||
"Headscale" = mkPublicReverseProxy "headscale" "${clusterIP}:8085" {};
|
||||
"SearXNG" = mkPublicReverseProxy "search" "${clusterIP}:8080" {};
|
||||
|
||||
"Jellyfin" = mkPublicReverseProxy "jelly" "${nosIP}:8096" {
|
||||
subDirectories.jfa-go = {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./headscale
|
||||
./nfs-client.nix
|
||||
./pcsd.nix
|
||||
./searxng
|
||||
./unbound.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -48,6 +48,12 @@ in {
|
|||
group = "caddy-grp";
|
||||
startAfter = ["headscale"];
|
||||
};
|
||||
|
||||
"searx" = {
|
||||
enable = true;
|
||||
group = "caddy-grp";
|
||||
startAfter = ["caddy"];
|
||||
};
|
||||
};
|
||||
|
||||
nodes = [
|
||||
|
|
73
configurations/cluster/modules/searxng/default.nix
Normal file
73
configurations/cluster/modules/searxng/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mapAttrsToList;
|
||||
in {
|
||||
services.searx = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.searxng.overrideAttrs (o: {
|
||||
postInstall = ''
|
||||
${o.postInstall or ""}
|
||||
# Replace logo
|
||||
cp ${./logo.png} $out/${pkgs.python3.sitePackages}/searx/static/themes/simple/img/searxng.png
|
||||
'';
|
||||
});
|
||||
|
||||
environmentFile = config.sops.secrets.searxng.path;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
instance_name = "Search";
|
||||
debug = false;
|
||||
enable_metrics = false;
|
||||
};
|
||||
|
||||
search = {
|
||||
autocomplete = "google";
|
||||
favicon_resolver = "google";
|
||||
|
||||
safe_search = 0;
|
||||
|
||||
default_lang = "en-CA";
|
||||
};
|
||||
|
||||
ui = {
|
||||
infinite_scroll = true;
|
||||
query_in_title = true;
|
||||
hotkeys = "vim";
|
||||
};
|
||||
|
||||
server = {
|
||||
port = 8080;
|
||||
bind_address = config.services.pcsd.virtualIps.caddy-vip.ip;
|
||||
|
||||
secret_key = "@SEARXNG_SECRET@";
|
||||
|
||||
public_instance = false;
|
||||
};
|
||||
|
||||
engines = mapAttrsToList (name: value: {inherit name;} // value) {
|
||||
"duckduckgo".disabled = false;
|
||||
"duckduckgo images".disabled = false;
|
||||
"gitlab".disabled = false;
|
||||
"qwant".disabled = false;
|
||||
"reddit".disabled = false;
|
||||
|
||||
"wikipedia" = {
|
||||
engine = "wikipedia";
|
||||
shortcut = "w";
|
||||
base_url = "https://wikipedia.org/";
|
||||
};
|
||||
|
||||
"github" = {
|
||||
engine = "github";
|
||||
shortcut = "gh";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
BIN
configurations/cluster/modules/searxng/logo.png
Normal file
BIN
configurations/cluster/modules/searxng/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
8
flake.lock
generated
8
flake.lock
generated
|
@ -1782,11 +1782,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733938992,
|
||||
"narHash": "sha256-KfTFLE6g0C2y9l1SlH2xoKuEB9AkCm2OvZa+oSoNwCw=",
|
||||
"lastModified": 1736987830,
|
||||
"narHash": "sha256-gsVXBT/WsOij9/xQfSKwmbnl0VdywNvD5ZokpPhhQTg=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "d335c6e9785c84f3c5110ca1b0ecdc7c7ea7fc9c",
|
||||
"revCount": 85,
|
||||
"rev": "5cb94ad18fed259201660562f01cab16dc73430c",
|
||||
"revCount": 86,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
||||
},
|
||||
|
|
|
@ -107,9 +107,20 @@ in {
|
|||
};
|
||||
|
||||
search = {
|
||||
default = "DuckDuckGo";
|
||||
default = "SearXNG";
|
||||
force = true;
|
||||
engines = {
|
||||
"SearXNG" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nelim.org/search?q={searchTerms}";
|
||||
}
|
||||
];
|
||||
iconUpdateURL = "https://search.nelim.org/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = ["@s"];
|
||||
};
|
||||
|
||||
"Nixpkgs" = {
|
||||
urls = [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue