mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nixos/searx: reformat tests with nixfmt-rfc-style
This commit is contained in:
parent
931b1bb0f1
commit
da9d79d6bc
@ -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"):
|
||||
|
Loading…
Reference in New Issue
Block a user