mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add frontends
This commit is contained in:
parent
4b3808c042
commit
92528d7121
8 changed files with 87 additions and 58 deletions
|
|
@ -2,7 +2,7 @@
|
|||
let
|
||||
inherit (lib) types mkOption mkEnableOption;
|
||||
cfg = config.mods.server.search;
|
||||
port = 8081;
|
||||
port = config.mods.server.nginx.ports.search;
|
||||
in {
|
||||
options.mods.server.search = {
|
||||
enable = mkEnableOption {
|
||||
|
|
@ -12,27 +12,9 @@ in {
|
|||
};
|
||||
|
||||
config = {
|
||||
# mods.server.nginx.ports.search = port;
|
||||
services.nginx.virtualHosts."search.muon.host" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.3:${toString port}";
|
||||
proxyWebsockets = true; # needed if you need to use WebSocket
|
||||
extraConfig =
|
||||
# required when the server wants to use HTTP Authentication
|
||||
"proxy_pass_header Authorization;";
|
||||
};
|
||||
};
|
||||
services.searx = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
# runInUwsgi = true;
|
||||
# uwsgiConfig = {
|
||||
# disable-logging = true;
|
||||
# http = ":${toString port}";
|
||||
# };
|
||||
|
||||
settings = {
|
||||
server.port = port;
|
||||
server.bind_address = "0.0.0.0";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue