From aa675991525e9e906543553671f7935e3e2e70f5 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 11 Mar 2026 01:43:52 +0100 Subject: [PATCH 1/2] searxng: Init module --- modules/nixos/web-services/searxng.nix | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 modules/nixos/web-services/searxng.nix diff --git a/modules/nixos/web-services/searxng.nix b/modules/nixos/web-services/searxng.nix new file mode 100644 index 0000000..97ffcaf --- /dev/null +++ b/modules/nixos/web-services/searxng.nix @@ -0,0 +1,44 @@ +{ config, lib, ... }: +let + cfg = config.custom.web-services.searxng; +in +{ + options.custom.web-services.searxng = { + enable = lib.mkEnableOption ""; + domain = lib.mkOption { + type = lib.types.nonEmptyStr; + default = ""; + }; + port = lib.mkOption { + type = lib.types.port; + default = 27916; + }; + }; + + config = lib.mkIf cfg.enable { + services.searx = { + enable = true; + settings = { + server = { + port = cfg.port; + secret_key = "unnecessary"; + }; + ui.center_alignment = true; + plugins = { + "searx.plugins.calculator.SXNGPlugin".active = true; + "searx.plugins.infinite_scroll.SXNGPlugin".active = true; + "searx.plugins.self_info.SXNGPlugin".active = true; + }; + }; + }; + + custom = { + services.caddy.virtualHosts.${cfg.domain}.port = cfg.port; + + meta.sites.${cfg.domain} = { + title = "SearXNG"; + icon = "sh:searxng"; + }; + }; + }; +} From a94e7e88985a198ebb3d49475a6e627b5c7c51fb Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 11 Mar 2026 01:44:08 +0100 Subject: [PATCH 2/2] srv-core: Enable searxng --- hosts/srv-core/configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/srv-core/configuration.nix b/hosts/srv-core/configuration.nix index 1f34570..5bdf6fe 100644 --- a/hosts/srv-core/configuration.nix +++ b/hosts/srv-core/configuration.nix @@ -71,6 +71,11 @@ enable = true; domain = "home.${config.custom.networking.overlay.domain}"; }; + + searxng = { + enable = true; + domain = "search.${config.custom.networking.overlay.domain}"; + }; }; }; }