summaryrefslogtreecommitdiff
path: root/config/services/web/searx/morty/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/services/web/searx/morty/default.nix')
-rw-r--r--config/services/web/searx/morty/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/config/services/web/searx/morty/default.nix b/config/services/web/searx/morty/default.nix
new file mode 100644
index 0000000..1a2b0e7
--- /dev/null
+++ b/config/services/web/searx/morty/default.nix
@@ -0,0 +1,22 @@
+{ config, lib, ... }:
+
+let cfg = config.services.morty;
+in {
+ services.nginx.virtualHosts."searx.aristote.fr".locations =
+ lib.mkIf cfg.enable {
+ "/morty/" = {
+ proxyPass = "http://127.0.0.1:${toString cfg.port}";
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header Connection $http_connection;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Scheme $scheme;
+ '';
+ };
+ };
+
+ services.morty = {
+ enable = false;
+ };
+}