From a72a910f374ac00489edc6d0513458643258c8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 8 May 2023 18:27:49 +0100 Subject: [PATCH] move search to bolty --- nixos/boxes/bolty/default.nix | 1 + nixos/boxes/bolty/search.nix | 12 ++++++++++++ nixos/boxes/vpsfree1/search.nix | 9 +-------- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 nixos/boxes/bolty/search.nix diff --git a/nixos/boxes/bolty/default.nix b/nixos/boxes/bolty/default.nix index 5cc7adab..a64617b1 100644 --- a/nixos/boxes/bolty/default.nix +++ b/nixos/boxes/bolty/default.nix @@ -15,6 +15,7 @@ ./tailscale-cert.nix ./virtualisation.nix ./woodpecker-agent.nix + ./search.nix ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; programs.ccache.enable = true; diff --git a/nixos/boxes/bolty/search.nix b/nixos/boxes/bolty/search.nix new file mode 100644 index 00000000..8711f195 --- /dev/null +++ b/nixos/boxes/bolty/search.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: { + imports = [ ../nginx.nix ]; + + networking.firewall.allowedTCPPorts = [ 8888 ]; + virtualisation.oci-containers.containers.searxng = { + image = + "searxng/searxng@sha256:650c0b183a129e10c2493126bb27c3541ffebbead6e0255fab91831457211b06"; + volumes = [ ]; + environment = { BASE_URL = "https://search.cyplo.dev"; }; + ports = [ "8888:8080" ]; + }; +} diff --git a/nixos/boxes/vpsfree1/search.nix b/nixos/boxes/vpsfree1/search.nix index 22dfc8d1..136748de 100644 --- a/nixos/boxes/vpsfree1/search.nix +++ b/nixos/boxes/vpsfree1/search.nix @@ -15,18 +15,11 @@ proxy_buffer_size 256k; ''; locations."/" = { - proxyPass = "http://127.0.0.1:8888"; + proxyPass = "http://bolty:8888"; proxyWebsockets = true; }; }; }; }; - virtualisation.oci-containers.containers.searxng = { - image = - "searxng/searxng@sha256:650c0b183a129e10c2493126bb27c3541ffebbead6e0255fab91831457211b06"; - volumes = [ ]; - environment = { BASE_URL = "https://search.cyplo.dev"; }; - ports = [ "8888:8080" ]; - }; }