l: add searx via search.r
This commit is contained in:
parent
73adafe901
commit
38c46e3c08
@ -67,6 +67,7 @@ in {
|
||||
"cgit.prism.r"
|
||||
"paste.r"
|
||||
"p.r"
|
||||
"search.r"
|
||||
];
|
||||
tinc.port = 655;
|
||||
tinc.pubkey = ''
|
||||
|
@ -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
23
lass/2configs/searx.nix
Normal 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>;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
1
lass/2configs/tests/dummy-secrets/searx.key
Normal file
1
lass/2configs/tests/dummy-secrets/searx.key
Normal file
@ -0,0 +1 @@
|
||||
yolo
|
Loading…
Reference in New Issue
Block a user