nixos/searx: reformat tests with nixfmt-rfc-style

This commit is contained in:
Pol Dellaiera 2024-06-19 07:04:46 +02:00
parent 931b1bb0f1
commit da9d79d6bc
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -7,7 +7,9 @@
};
# basic setup: searx running the built-in webserver
nodes.base = { ... }: {
nodes.base =
{ ... }:
{
services.searx = {
enable = true;
environmentFile = pkgs.writeText "secrets" ''
@ -15,17 +17,19 @@
SEARX_SECRET_KEY = somesecret
'';
settings.server =
{ port = "8080";
settings.server = {
port = "8080";
bind_address = "0.0.0.0";
secret_key = "@SEARX_SECRET_KEY@";
};
settings.engines = [
{ name = "wolframalpha";
{
name = "wolframalpha";
api_key = "@WOLFRAM_API_KEY@";
engine = "wolframalpha_api";
}
{ name = "startpage";
{
name = "startpage";
shortcut = "start";
}
];
@ -34,7 +38,9 @@
};
# fancy setup: run in uWSGI and use nginx as proxy
nodes.fancy = { config, ... }: {
nodes.fancy =
{ config, ... }:
{
services.searx = {
enable = true;
# searx refuses to run if unchanged
@ -56,8 +62,7 @@
# use nginx as reverse proxy
services.nginx.enable = true;
services.nginx.virtualHosts.localhost = {
locations."/searx".extraConfig =
''
locations."/searx".extraConfig = ''
include ${pkgs.nginx}/conf/uwsgi_params;
uwsgi_pass unix:/run/searx/uwsgi.sock;
'';
@ -69,8 +74,7 @@
};
testScript =
''
testScript = ''
base.start()
with subtest("Settings have been merged"):