Unverified Commit 11ba4eb0 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

searxng: 0-unstable-2025-07-08 -> 0-unstable-2025-07-16

parent 3e32a1a2
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -48,11 +48,6 @@ let
    };
in
{
  imports = [
    (mkRenamedOptionModule [ "services" "searx" "configFile" ] [ "services" "searx" "settingsFile" ])
    (mkRenamedOptionModule [ "services" "searx" "runInUwsgi" ] [ "services" "searx" "configureUwsgi" ])
  ];

  options = {
    services.searx = {
      enable = mkOption {
@@ -89,7 +84,12 @@ in
      };

      settings = mkOption {
        type = types.attrsOf settingType;
        type = types.submodule {
          freeformType = settingType;
          imports = [
            (mkRenamedOptionModule [ "redis" ] [ "valkey" ])
          ];
        };
        default = { };
        example = literalExpression ''
          {
@@ -231,6 +231,11 @@ in
    };
  };

  imports = [
    (mkRenamedOptionModule [ "services" "searx" "configFile" ] [ "services" "searx" "settingsFile" ])
    (mkRenamedOptionModule [ "services" "searx" "runInUwsgi" ] [ "services" "searx" "configureUwsgi" ])
  ];

  config = mkIf cfg.enable {
    environment = {
      etc = {
@@ -277,7 +282,6 @@ in
        settings = {
          # merge NixOS settings with defaults settings.yml
          use_default_settings = mkDefault true;
          redis.url = lib.mkIf cfg.redisCreateLocally "unix://${config.services.redis.servers.searx.unixSocket}";
          server.base_url = lib.mkIf cfg.configureNginx "http${
            lib.optionalString (lib.any lib.id (
              with config.services.nginx.virtualHosts."${cfg.domain}";
@@ -289,6 +293,7 @@ in
            )) "s"
          }://${cfg.domain}/";
          ui.static_use_hash = true;
          valkey.url = lib.mkIf cfg.redisCreateLocally "unix://${config.services.redis.servers.searx.unixSocket}";
        };
      };

+22 −17
Original line number Diff line number Diff line
@@ -17,12 +17,8 @@
          SEARX_SECRET_KEY = somesecret
        '';

        settings.server = {
          port = "8080";
          bind_address = "0.0.0.0";
          secret_key = "@SEARX_SECRET_KEY@";
        };
        settings.engines = [
        settings = {
          engines = [
            {
              name = "wolframalpha";
              api_key = "@WOLFRAM_API_KEY@";
@@ -33,6 +29,13 @@
              shortcut = "start";
            }
          ];
          plugins = { };
          server = {
            port = "8080";
            bind_address = "0.0.0.0";
            secret_key = "@SEARX_SECRET_KEY@";
          };
        };
      };

    };
@@ -43,8 +46,10 @@
    {
      services.searx = {
        enable = true;
        # searx refuses to run if unchanged
        settings.server.secret_key = "somesecret";
        settings = {
          plugins = { };
          server.secret_key = "somesecret";
        };

        configureNginx = true;
        domain = "localhost";
+10 −34
Original line number Diff line number Diff line
@@ -7,45 +7,20 @@
}:
let
  python = python3.override {
    packageOverrides = final: prev: {
      httpx = prev.httpx.overridePythonAttrs (old: rec {
        version = "0.27.2";
        src = old.src.override {
          tag = version;
          hash = "sha256-N0ztVA/KMui9kKIovmOfNTwwrdvSimmNkSvvC+3gpck=";
        };
      });

      httpx-socks = prev.httpx-socks.overridePythonAttrs (old: rec {
        version = "0.9.2";
        src = old.src.override {
          tag = "v${version}";
          hash = "sha256-PUiciSuDCO4r49st6ye5xPLCyvYMKfZY+yHAkp5j3ZI=";
        };
      });

      starlette = prev.starlette.overridePythonAttrs (old: {
        disabledTests = old.disabledTests or [ ] ++ [
          # fails in assertion with spacing issue
          "test_request_body"
          "test_request_stream"
          "test_wsgi_post"
        ];
      });
    };
    packageOverrides = final: prev: { };
  };
in
python.pkgs.toPythonModule (
  python.pkgs.buildPythonApplication rec {
    pname = "searxng";
    version = "0-unstable-2025-07-08";
    version = "0-unstable-2025-07-16";
    format = "setuptools";

    src = fetchFromGitHub {
      owner = "searxng";
      repo = "searxng";
      rev = "bd593d0bad2189f57657bbcfa2c5e86f795c680e";
      hash = "sha256-vNI66OKA8LPXqc2mt8lm4iKS6njRLQhjzcykCQyPJsk=";
      rev = "62fac1c6a9db94682f8ef686f0424a482663b288";
      hash = "sha256-3Ma16EdQdqnXyz+ipH5qq9TF0+DwpNU2kq2RTgK5b/A=";
    };

    postPatch = ''
@@ -77,23 +52,24 @@ python.pkgs.toPythonModule (
        babel
        brotli
        certifi
        cryptography
        fasttext-predict
        flask
        flask-babel
        httpx
        httpx-socks
        isodate
        jinja2
        lxml
        markdown-it-py
        msgspec
        pygments
        python-dateutil
        pyyaml
        redis
        setproctitle
        typer
        uvloop
        setproctitle
        httpx
        httpx-socks
        markdown-it-py
        valkey
      ]
      ++ httpx.optional-dependencies.http2
      ++ httpx-socks.optional-dependencies.asyncio;