l: add searx via search.r

This commit is contained in:
lassulus 2021-04-17 11:26:14 +02:00
parent 73adafe901
commit 38c46e3c08
4 changed files with 26 additions and 0 deletions

View file

@ -67,6 +67,7 @@ in {
"cgit.prism.r"
"paste.r"
"p.r"
"search.r"
];
tinc.port = 655;
tinc.pubkey = ''

View file

@ -194,6 +194,7 @@ with import <stockholm/lib>;
}
<stockholm/lass/2configs/minecraft.nix>
<stockholm/lass/2configs/codimd.nix>
<stockholm/lass/2configs/searx.nix>
{
services.taskserver = {
enable = true;

23
lass/2configs/searx.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
let
port = 8889;
in {
services.nginx.virtualHosts.search = {
serverAliases = [ "search.r" ];
locations."/".extraConfig = ''
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:${builtins.toString port};
'';
};
services.searx = {
enable = true;
configFile = pkgs.writeText "searx.cfg" (builtins.toJSON {
use_default_settings = true;
server = {
port = port;
secret_key = builtins.readFile <secrets/searx.key>;
};
});
};
}

View file

@ -0,0 +1 @@
yolo