From d58da536b1cbe4beb51d4e3d074014bba904ec26 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sun, 29 Dec 2024 09:34:18 -0600 Subject: [PATCH] Add Searxng. --- hosts/hub/apps/searxng.nix | 23 +++++++++++++++++++++++ hosts/hub/default.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 hosts/hub/apps/searxng.nix diff --git a/hosts/hub/apps/searxng.nix b/hosts/hub/apps/searxng.nix new file mode 100644 index 0000000..8044a6c --- /dev/null +++ b/hosts/hub/apps/searxng.nix @@ -0,0 +1,23 @@ +{ config, ... }: + +{ + systemd.tmpfiles.rules = [ + "d /var/lib/searxng 0755 root root" + ]; + + virtualisation.oci-containers.containers.searxng = { + image = "searxng/searxng:latest"; + environment = { + BASE_URL = "https://searxng.tailc50184.ts.net"; + }; + ports = [ + "8080:8080" + ]; + volumes = [ "/var/lib/searxng:/etc/searxng" ]; + }; + + services.caddy.virtualHosts."https://searxng.tailc50184.ts.net".extraConfig = '' + bind tailscale/searxng + reverse_proxy http://localhost:8080 + ''; +} diff --git a/hosts/hub/default.nix b/hosts/hub/default.nix index 59f0a96..c09ac23 100644 --- a/hosts/hub/default.nix +++ b/hosts/hub/default.nix @@ -22,6 +22,7 @@ ../../roles/syncthing.nix ./apps/dev.nix ./apps/nextcloud.nix + ./apps/searxng.nix ]; boot.loader.grub = {