nixos/tests/searx: use configured package for static content

Also use the simple theme because upstream dropped the oscar one:
https://github.com/searxng/searxng/discussions/1167
This commit is contained in:
Robert Schütz 2024-02-28 15:39:23 -08:00
parent 3330e3c9c3
commit 603c5af519

View file

@ -36,7 +36,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
}; };
# fancy setup: run in uWSGI and use nginx as proxy # fancy setup: run in uWSGI and use nginx as proxy
nodes.fancy = { ... }: { nodes.fancy = { config, ... }: {
imports = [ ../modules/profiles/minimal.nix ]; imports = [ ../modules/profiles/minimal.nix ];
services.searx = { services.searx = {
@ -65,7 +65,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
include ${pkgs.nginx}/conf/uwsgi_params; include ${pkgs.nginx}/conf/uwsgi_params;
uwsgi_pass unix:/run/searx/uwsgi.sock; uwsgi_pass unix:/run/searx/uwsgi.sock;
''; '';
locations."/searx/static/".alias = "${pkgs.searx}/share/static/"; locations."/searx/static/".alias = "${config.services.searx.package}/share/static/";
}; };
# allow nginx access to the searx socket # allow nginx access to the searx socket
@ -108,7 +108,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
"${pkgs.curl}/bin/curl --fail http://localhost/searx >&2" "${pkgs.curl}/bin/curl --fail http://localhost/searx >&2"
) )
fancy.succeed( fancy.succeed(
"${pkgs.curl}/bin/curl --fail http://localhost/searx/static/themes/oscar/js/bootstrap.min.js >&2" "${pkgs.curl}/bin/curl --fail http://localhost/searx/static/themes/simple/js/leaflet.js >&2"
) )
''; '';
}) })