1
Fork 0
satellite/hosts/nixos/lapetus/services/whoogle.nix

32 lines
773 B
Nix
Raw Normal View History

2024-01-18 07:44:16 +01:00
{ lib, ... }:
let
port = 8401;
websiteBlocklist = [
2024-01-31 20:26:11 +01:00
"www.saashub.com"
2024-01-18 07:44:16 +01:00
"slant.co"
"nix-united.com"
"libhunt.com"
];
in
{
2024-01-31 20:26:11 +01:00
imports = [ ../../common/optional/podman.nix ./nginx.nix ];
2024-01-18 07:44:16 +01:00
2024-01-18 07:48:58 +01:00
virtualisation.oci-containers.containers.whoogle-search = {
2024-01-18 07:44:16 +01:00
image = "benbusby/whoogle-search";
autoStart = true;
2024-01-18 07:49:59 +01:00
ports = [ "${toString port}:5000" ]; # server:docker
2024-01-18 07:44:16 +01:00
environment = {
2024-01-18 07:47:17 +01:00
WHOOGLE_UPDATE_CHECK = "0";
WHOOGLE_CONFIG_DISABLE = "0";
WHOOGLE_CONFIG_BLOCK = lib.concatStringsSep "," websiteBlocklist;
2024-01-18 07:44:16 +01:00
WHOOGLE_CONFIG_THEME = "system";
};
};
2024-01-31 20:26:11 +01:00
services.nginx.virtualHosts."search.moonythm.dev" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
};
2024-01-18 07:44:16 +01:00
}