searxng/module.nix: fix nginx, cleanup

This commit is contained in:
Charlie Root 2025-04-06 22:34:58 +02:00
commit b3139f4e8d
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E

View file

@ -6,7 +6,7 @@
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (lib.strings) toString;
inherit (builtins) toString;
cfg = config.modules.services.searxng;
port = 4021;
in {
@ -15,9 +15,8 @@ in {
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [port];
modules.system.services.nginx.enable = true;
services = {
nginx.enable = true;
searx = {
enable = true;
package = pkgs.searxng;
@ -101,7 +100,7 @@ in {
];
};
};
nginx.virtualhosts."search.copeberg.org" = {
nginx.virtualHosts."search.copeberg.org" = {
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
extraConfig = ''
access_log /dev/null;