add searx and fix caddy cloudflare stuff
This commit is contained in:
parent
72303fd21c
commit
f8ac4c667d
8 changed files with 85 additions and 7 deletions
35
modules/searx.nix
Normal file
35
modules/searx.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.searx;
|
||||
sockPath = "/run/searx/searx.sock";
|
||||
in
|
||||
{
|
||||
options.my.searx = {
|
||||
enable = lib.mkEnableOption "searx";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.searx = {
|
||||
enable = true;
|
||||
runInUwsgi = true;
|
||||
uwsgiConfig = {
|
||||
disable-logging = true;
|
||||
http = "127.0.0.1:8090";
|
||||
};
|
||||
settings = {
|
||||
# get secret from env
|
||||
server.secret_key = "@SEARX_SECRET_KEY@";
|
||||
};
|
||||
environmentFile = config.sops.secrets."searx/env".path;
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."x.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy 127.0.0.1:8090
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue