42 lines
952 B
Nix
42 lines
952 B
Nix
{ config, ... }:
|
|
let
|
|
inherit (import ./lib.nix config) havenisms mkContainer;
|
|
in
|
|
{
|
|
sops = {
|
|
secrets = {
|
|
"searxng/secret" = { };
|
|
};
|
|
templates."searxng.env" = {
|
|
mode = "0400";
|
|
content = ''
|
|
SEARXNG_BASE_URL=https://search.${havenisms}
|
|
SEARXNG_VALKEY_URL=valkey://valkey:6379/0
|
|
SEARXNG_SECRET=${config.sops.placeholder."searxng/secret"}
|
|
'';
|
|
};
|
|
};
|
|
virtualisation.oci-containers.containers.searxng = mkContainer {
|
|
hostName = "search";
|
|
image = "searxng/searxng:latest";
|
|
port = 8080;
|
|
public = true;
|
|
dependsOn = [
|
|
"valkey"
|
|
];
|
|
homepageOpts = {
|
|
group = "Apps";
|
|
name = "SearXNG";
|
|
icon = "searxng.svg";
|
|
description = "Web search proxy";
|
|
};
|
|
volumes = [
|
|
"/tank/config/searxng:/etc/searxng"
|
|
];
|
|
environmentFiles = [
|
|
config.sops.templates."searxng.env".path
|
|
];
|
|
extraOptions = [ "--pull=always" ];
|
|
};
|
|
}
|