update searxng

This commit is contained in:
Henry Hiles 2025-09-14 15:39:26 -04:00
commit f8153d4929
No known key found for this signature in database
3 changed files with 127 additions and 128 deletions

View file

@ -1,49 +1,47 @@
{ lib, ... }:
{
lib,
inputs,
pkgs,
...
}: {
services = let
services =
let
socket = "/var/run/searx/socket";
domain = "search.federated.nexus";
in {
in
{
searx = {
enable = true;
package = inputs.nixpkgs-master.legacyPackages.${pkgs.system}.searxng;
settings = let
settings =
let
enginesByCategory = {
general = {
google = {};
duckduckgo = {};
google = { };
duckduckgo = { };
};
"social media" = {
tootfinder = {};
"mastodon users" = {};
"lemmy communities" = {};
"lemmy comments" = {};
"lemmy users" = {};
"lemmy posts" = {};
tootfinder = { };
"mastodon users" = { };
"lemmy communities" = { };
"lemmy comments" = { };
"lemmy users" = { };
"lemmy posts" = { };
};
images = {
"duckduckgo images".disabled = false;
"google images" = {};
"google images" = { };
};
map.openstreetmap = {};
map.openstreetmap = { };
videos = {
peertube.disabled = false;
youtube = {};
youtube = { };
};
it = {
github = {};
askubuntu = {};
superuser = {};
stackoverflow = {};
github = { };
askubuntu = { };
superuser = { };
stackoverflow = { };
codeberg.disabled = false;
"gitea.com".disabled = false;
"git.federated.nexus" = {
@ -53,20 +51,18 @@
};
};
engines =
builtins.foldl'
(
engines = builtins.foldl' (
acc: category:
acc
// lib.mapAttrs' (name: val: {
name = name;
value = val // {categories = [category];};
})
enginesByCategory.${category}
)
{}
(lib.attrNames enginesByCategory);
in {
value = val // {
categories = [ category ];
};
}) enginesByCategory.${category}
) { } (lib.attrNames enginesByCategory);
in
{
general = {
instance_name = "Federated Nexus Search";
contact_url = "mailto:henry@henryhiles.com";
@ -98,24 +94,28 @@
categories_as_tabs = builtins.listToAttrs (
map (category: {
name = category;
value = {};
value = { };
}) (lib.attrNames enginesByCategory)
);
use_default_settings.engines.keep_only = lib.attrNames engines;
engines = lib.mapAttrsToList (name: value: {inherit name;} // value) engines;
engines = lib.mapAttrsToList (name: value: { inherit name; } // value) engines;
};
};
caddy.authedHosts."${domain}" = "reverse_proxy unix/${socket}";
};
systemd.services = let
systemd.services =
let
commonConfig = builtins.mapAttrs (_: value: lib.mkForce value) {
Group = "caddy";
RuntimeDirectoryMode = "0770";
UMask = "007";
};
in {
searx.serviceConfig = commonConfig // {Restart = "always";};
in
{
searx.serviceConfig = commonConfig // {
Restart = "always";
};
searx-init.serviceConfig = commonConfig;
};
}

52
flake.lock generated
View file

@ -1231,11 +1231,11 @@
]
},
"locked": {
"lastModified": 1757650187,
"narHash": "sha256-OrythrqccPKtuVt0mj26rr83Qo3Ljb4ZmwLdPGjzjMU=",
"lastModified": 1757809953,
"narHash": "sha256-29mlXbfAJhz9cWVrPP4STvVPDVZFCfCOmaIN5lFJa+Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9eab59f3e71ea3a725e4817d8dcf0da0824ad19d",
"rev": "17a10049486f6698fca32097d8f52c0c895542b0",
"type": "github"
},
"original": {
@ -1679,11 +1679,11 @@
]
},
"locked": {
"lastModified": 1755960008,
"narHash": "sha256-kjqGfWvpJl8Kl8P8a98q1V6L1x3qO7wKqdSWcMa9RVk=",
"lastModified": 1757876373,
"narHash": "sha256-7FllmEOH1Dbt+BVzhFPeweG2ToK7Jy3lcUrUYkWQmFc=",
"ref": "refs/heads/main",
"rev": "fa1d74714dd59e763794bce46e865a49b58a5840",
"revCount": 20,
"rev": "04a784bb954cdd4638690ea0edd779c994bb3214",
"revCount": 21,
"type": "git",
"url": "https://git.federated.nexus/federated-nexus/nexusbot"
},
@ -2317,21 +2317,6 @@
"type": "github"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1757686808,
"narHash": "sha256-PL+Z3OrNpFNHddbsBaxeojYkWObYc2NlyhTmsmpt+hc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "098982b6eca9b809cc2f583e733338f5a36b3ad8",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-riscv": {
"locked": {
"lastModified": 1752147015,
@ -2398,11 +2383,27 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1757487488,
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
"lastModified": 1754214453,
"narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1757745802,
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
"type": "github"
},
"original": {
@ -2685,7 +2686,6 @@
"nix-matrix-appservices": "nix-matrix-appservices",
"nixpkgs": "nixpkgs_2",
"nixpkgs-lasuite": "nixpkgs-lasuite",
"nixpkgs-master": "nixpkgs-master",
"ooye": "ooye",
"run0-sudo-shim": "run0-sudo-shim",
"sdm845": "sdm845",

View file

@ -2,7 +2,6 @@
inputs = {
gnome-mobile.url = "github:chuangzhu/nixpkgs-gnome-mobile";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs";
nixpkgs-lasuite.url = "github:Henry-Hiles/nixpkgs/bump-lasuite";
wrapper-manager.url = "github:viperML/wrapper-manager";
flake-parts.url = "github:hercules-ci/flake-parts";