Skip to content

Commit 5edf5e0

Browse files
Kabuki94claude
andcommitted
feat(searxng): always-on Quadlet for privacy-respecting metasearch
SearXNG is the search counterpart to mios-ai/ollama: a single localhost endpoint (http://localhost:8888/) that aggregates ~250 upstream search engines without leaking IP, user-agent, or session identifier to any of them. AGPL-3.0, 100% local, no API key, no telemetry. Pairs with the agent surface as a `web_search` tool target without breaking Architectural Law 5 -- a search proxy is not a model, so no UNIFIED- AI-REDIRECTS exception is required. Files: * etc/containers/systemd/mios-searxng.container -- Quadlet pinned at docker.io/searxng/searxng:latest@sha256:885f1cd1bb86d759aa4724a1986 a61c000292823ff8eeb17d34de1a8acb74477 (multi-arch index digest, so one pin works on amd64/arm64/armv7). PublishPort 8888:8080 so the host port doesn't clash with mios-ai's 8080. * usr/lib/sysusers.d/50-mios-services.conf -- pin mios-searxng UID/ GID to 818 (next free in the 810-829 service range; 817 is mios-ai in 50-mios-ai.conf). * usr/lib/tmpfiles.d/mios-searxng.conf -- 0750 mios-searxng:mios- searxng on /etc/mios/searxng and /var/cache/mios/searxng, plus a `C` line that copies vendor settings.yml on first boot only. * usr/share/mios/searxng/settings.yml -- vendor defaults: instance name "MiOS Search", placeholder secret_key (regenerated at first container start by SearXNG's entrypoint), formats: html + json (json required for the agent web_search tool surface), telemetry off, donation/contact URLs off. * usr/share/mios/mios.toml -- new [search] section with endpoint and enable flag, sitting alongside [ai]. * usr/share/mios/env.defaults -- MIOS_SEARXNG_{VERSION,IMAGE,PORT, USER,UID,GID} for shell-side consumers. * automation/lib/globals.{sh,ps1} -- mirror env.defaults: user/uid/ gid + port + URL + unit name + container image ref. * usr/libexec/mios/mios-dashboard.sh -- show "Search" endpoint dot in the Self-replication-loop section and add mios-searxng to the Quadlet status list. * usr/lib/systemd/system-preset/90-mios.preset -- enable mios-searxng.service alongside cockpit.socket. No new .gitignore entries needed: mios-searxng.container matches the existing `etc/containers/systemd/mios*` whitelist, mios-searxng.conf matches `*mios*` under tmpfiles.d, and usr/share/mios/searxng/ is covered by the broad `!/usr/share/mios/**` whitelist. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 69cf6e3 commit 5edf5e0

10 files changed

Lines changed: 204 additions & 5 deletions

File tree

automation/lib/globals.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ $script:MIOS_CEPH_USER = if ($env:MIOS_CEPH_USER) { $env:MIOS_CEPH_USER }
5151
$script:MIOS_CEPH_UID = if ($env:MIOS_CEPH_UID) { [int]$env:MIOS_CEPH_UID } else { 819 }
5252
$script:MIOS_CEPH_GID = if ($env:MIOS_CEPH_GID) { [int]$env:MIOS_CEPH_GID } else { 819 }
5353

54+
$script:MIOS_SEARXNG_USER = if ($env:MIOS_SEARXNG_USER) { $env:MIOS_SEARXNG_USER } else { 'mios-searxng' }
55+
$script:MIOS_SEARXNG_UID = if ($env:MIOS_SEARXNG_UID) { [int]$env:MIOS_SEARXNG_UID } else { 818 }
56+
$script:MIOS_SEARXNG_GID = if ($env:MIOS_SEARXNG_GID) { [int]$env:MIOS_SEARXNG_GID } else { 818 }
57+
5458
$script:MIOS_SUBUID_START = if ($env:MIOS_SUBUID_START) { [int]$env:MIOS_SUBUID_START } else { 100000 }
5559
$script:MIOS_SUBUID_COUNT = if ($env:MIOS_SUBUID_COUNT) { [int]$env:MIOS_SUBUID_COUNT } else { 65536 }
5660

@@ -69,13 +73,15 @@ $script:MIOS_PORT_FORGE_SSH = if ($env:MIOS_PORT_FORGE_SSH) { [int]$env:
6973
$script:MIOS_PORT_LOCALAI = if ($env:MIOS_PORT_LOCALAI) { [int]$env:MIOS_PORT_LOCALAI } else { 8080 }
7074
$script:MIOS_PORT_COCKPIT = if ($env:MIOS_PORT_COCKPIT) { [int]$env:MIOS_PORT_COCKPIT } else { 9090 }
7175
$script:MIOS_PORT_OLLAMA = if ($env:MIOS_PORT_OLLAMA) { [int]$env:MIOS_PORT_OLLAMA } else { 11434 }
76+
$script:MIOS_PORT_SEARXNG = if ($env:MIOS_PORT_SEARXNG) { [int]$env:MIOS_PORT_SEARXNG } else { 8888 }
7277
$script:MIOS_PORT_COCKPIT_LINK = if ($env:MIOS_PORT_COCKPIT_LINK) { [int]$env:MIOS_PORT_COCKPIT_LINK } else { 19090 }
7378

7479
# ── URLS ─────────────────────────────────────────────────────────────
7580
$script:MIOS_AI_ENDPOINT = if ($env:MIOS_AI_ENDPOINT) { $env:MIOS_AI_ENDPOINT } else { "http://localhost:$($script:MIOS_PORT_LOCALAI)/v1" }
7681
$script:MIOS_FORGE_URL = if ($env:MIOS_FORGE_URL) { $env:MIOS_FORGE_URL } else { "http://localhost:$($script:MIOS_PORT_FORGE_HTTP)" }
7782
$script:MIOS_COCKPIT_URL = if ($env:MIOS_COCKPIT_URL) { $env:MIOS_COCKPIT_URL } else { "https://localhost:$($script:MIOS_PORT_COCKPIT)" }
7883
$script:MIOS_OLLAMA_URL = if ($env:MIOS_OLLAMA_URL) { $env:MIOS_OLLAMA_URL } else { "http://localhost:$($script:MIOS_PORT_OLLAMA)" }
84+
$script:MIOS_SEARXNG_URL = if ($env:MIOS_SEARXNG_URL) { $env:MIOS_SEARXNG_URL } else { "http://localhost:$($script:MIOS_PORT_SEARXNG)" }
7985

8086
# ── REPOS ────────────────────────────────────────────────────────────
8187
$script:MIOS_REPO_URL = if ($env:MIOS_REPO_URL) { $env:MIOS_REPO_URL } else { 'https://github.com/mios-dev/mios.git' }
@@ -144,6 +150,7 @@ $script:MIOS_UNIT_K3S = 'mios-k3s.service'
144150
$script:MIOS_UNIT_AICHAT_BUILD = 'mios-aichat-build.service'
145151
$script:MIOS_UNIT_AICHAT_IMAGE = 'mios-aichat-image.service'
146152
$script:MIOS_UNIT_COCKPIT_LINK = 'mios-cockpit-link.service'
153+
$script:MIOS_UNIT_SEARXNG = 'mios-searxng.service'
147154
$script:MIOS_UNIT_FIRSTBOOT_TARGET = 'mios-firstboot.target'
148155
$script:MIOS_UNIT_OLLAMA_FIRSTBOOT = 'mios-ollama-firstboot.service'
149156
$script:MIOS_UNIT_WSL_FIRSTBOOT = 'mios-wsl-firstboot.service'
@@ -155,6 +162,7 @@ $script:MIOS_CONTAINER_AICHAT_IMAGE = 'localhost/mios/aichat:latest'
155162
$script:MIOS_CONTAINER_FORGE_IMAGE = 'codeberg.org/forgejo/forgejo:12'
156163
$script:MIOS_CONTAINER_LOCALAI_IMAGE = 'docker.io/localai/localai:latest'
157164
$script:MIOS_CONTAINER_OLLAMA_IMAGE = 'docker.io/ollama/ollama:latest'
165+
$script:MIOS_CONTAINER_SEARXNG_IMAGE = 'docker.io/searxng/searxng:latest'
158166

159167
# ── COLOR PALETTE ────────────────────────────────────────────────────
160168
# Hokusai + operator-neutrals palette. Vendor defaults; resolved from

automation/lib/globals.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ export MIOS_VERSION
7070
: "${MIOS_CEPH_UID:=819}"
7171
: "${MIOS_CEPH_GID:=819}"
7272

73+
: "${MIOS_SEARXNG_USER:=mios-searxng}"
74+
: "${MIOS_SEARXNG_UID:=818}"
75+
: "${MIOS_SEARXNG_GID:=818}"
76+
7377
# Rootless-container subuid/subgid range. Standard Fedora useradd -m
7478
# allocates 100000:65536; we keep the same so /etc/subuid + /etc/subgid
7579
# stay consistent with stock Fedora workflows.
@@ -81,6 +85,7 @@ export MIOS_FORGE_USER MIOS_FORGE_UID MIOS_FORGE_GID
8185
export MIOS_AI_USER MIOS_AI_UID MIOS_AI_GID
8286
export MIOS_OLLAMA_USER MIOS_OLLAMA_UID MIOS_OLLAMA_GID
8387
export MIOS_CEPH_USER MIOS_CEPH_UID MIOS_CEPH_GID
88+
export MIOS_SEARXNG_USER MIOS_SEARXNG_UID MIOS_SEARXNG_GID
8489
export MIOS_SUBUID_START MIOS_SUBUID_COUNT
8590

8691
# ── IMAGES ───────────────────────────────────────────────────────────
@@ -100,9 +105,11 @@ export MIOS_LOCAL_IMAGE MIOS_BASE_IMAGE MIOS_BIB_IMAGE
100105
: "${MIOS_PORT_LOCALAI:=8080}"
101106
: "${MIOS_PORT_COCKPIT:=9090}"
102107
: "${MIOS_PORT_OLLAMA:=11434}"
108+
: "${MIOS_PORT_SEARXNG:=8888}"
103109
: "${MIOS_PORT_COCKPIT_LINK:=19090}" # podman-desktop discovery shim
104110
export MIOS_PORT_SSH MIOS_PORT_FORGE_HTTP MIOS_PORT_FORGE_SSH
105-
export MIOS_PORT_LOCALAI MIOS_PORT_COCKPIT MIOS_PORT_OLLAMA MIOS_PORT_COCKPIT_LINK
111+
export MIOS_PORT_LOCALAI MIOS_PORT_COCKPIT MIOS_PORT_OLLAMA
112+
export MIOS_PORT_SEARXNG MIOS_PORT_COCKPIT_LINK
106113

107114
# ── URLS ─────────────────────────────────────────────────────────────
108115
# Derived from PORTS so a single port change propagates. MIOS_AI_ENDPOINT
@@ -111,7 +118,8 @@ export MIOS_PORT_LOCALAI MIOS_PORT_COCKPIT MIOS_PORT_OLLAMA MIOS_PORT_COCKPIT_LI
111118
: "${MIOS_FORGE_URL:=http://localhost:${MIOS_PORT_FORGE_HTTP}}"
112119
: "${MIOS_COCKPIT_URL:=https://localhost:${MIOS_PORT_COCKPIT}}"
113120
: "${MIOS_OLLAMA_URL:=http://localhost:${MIOS_PORT_OLLAMA}}"
114-
export MIOS_AI_ENDPOINT MIOS_FORGE_URL MIOS_COCKPIT_URL MIOS_OLLAMA_URL
121+
: "${MIOS_SEARXNG_URL:=http://localhost:${MIOS_PORT_SEARXNG}}"
122+
export MIOS_AI_ENDPOINT MIOS_FORGE_URL MIOS_COCKPIT_URL MIOS_OLLAMA_URL MIOS_SEARXNG_URL
115123

116124
# ── REPOS ────────────────────────────────────────────────────────────
117125
: "${MIOS_REPO_URL:=https://github.com/mios-dev/mios.git}"
@@ -203,6 +211,7 @@ export MIOS_AI_SYSTEM_PROMPT MIOS_MCP_REGISTRY MIOS_BUILD_ENV_FILE
203211
: "${MIOS_UNIT_AICHAT_BUILD:=mios-aichat-build.service}"
204212
: "${MIOS_UNIT_AICHAT_IMAGE:=mios-aichat-image.service}"
205213
: "${MIOS_UNIT_COCKPIT_LINK:=mios-cockpit-link.service}"
214+
: "${MIOS_UNIT_SEARXNG:=mios-searxng.service}"
206215

207216
# Hand-written units
208217
: "${MIOS_UNIT_FIRSTBOOT_TARGET:=mios-firstboot.target}"
@@ -212,7 +221,7 @@ export MIOS_AI_SYSTEM_PROMPT MIOS_MCP_REGISTRY MIOS_BUILD_ENV_FILE
212221

213222
export MIOS_UNIT_AI MIOS_UNIT_FORGE MIOS_UNIT_FORGE_RUNNER MIOS_UNIT_OLLAMA
214223
export MIOS_UNIT_CEPH MIOS_UNIT_K3S MIOS_UNIT_AICHAT_BUILD MIOS_UNIT_AICHAT_IMAGE
215-
export MIOS_UNIT_COCKPIT_LINK MIOS_UNIT_FIRSTBOOT_TARGET
224+
export MIOS_UNIT_COCKPIT_LINK MIOS_UNIT_SEARXNG MIOS_UNIT_FIRSTBOOT_TARGET
216225
export MIOS_UNIT_OLLAMA_FIRSTBOOT MIOS_UNIT_WSL_FIRSTBOOT MIOS_UNIT_USER_SESSION
217226

218227
# ── CONTAINERS / DISTROBOX ───────────────────────────────────────────
@@ -221,10 +230,11 @@ export MIOS_UNIT_OLLAMA_FIRSTBOOT MIOS_UNIT_WSL_FIRSTBOOT MIOS_UNIT_USER_SESSION
221230
: "${MIOS_CONTAINER_FORGE_IMAGE:=codeberg.org/forgejo/forgejo:12}"
222231
: "${MIOS_CONTAINER_LOCALAI_IMAGE:=docker.io/localai/localai:latest}"
223232
: "${MIOS_CONTAINER_OLLAMA_IMAGE:=docker.io/ollama/ollama:latest}"
233+
: "${MIOS_CONTAINER_SEARXNG_IMAGE:=docker.io/searxng/searxng:latest}"
224234

225235
export MIOS_DISTROBOX_AICHAT MIOS_CONTAINER_AICHAT_IMAGE
226236
export MIOS_CONTAINER_FORGE_IMAGE MIOS_CONTAINER_LOCALAI_IMAGE
227-
export MIOS_CONTAINER_OLLAMA_IMAGE
237+
export MIOS_CONTAINER_OLLAMA_IMAGE MIOS_CONTAINER_SEARXNG_IMAGE
228238

229239
# ── COLOR PALETTE ────────────────────────────────────────────────────
230240
# Hokusai + operator-neutrals palette. Resolved from mios.toml [colors]
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# /etc/containers/systemd/mios-searxng.container
2+
# 'MiOS' privacy-respecting metasearch (SearXNG upstream).
3+
#
4+
# SearXNG is the search counterpart to mios-ai/ollama: it gives the
5+
# operator (and the LLM, via Tools) a single localhost endpoint that
6+
# aggregates results from ~250 upstream search engines without leaking
7+
# any IP, user-agent, or session identifier to those engines. It is
8+
# AGPL-3.0 and 100% local -- no external account, no API key, no
9+
# telemetry. Pairs naturally with the agent surface as a `web_search`
10+
# tool target without breaking Architectural Law 5 (no vendor cloud
11+
# AI URL): SearXNG is a *search proxy*, not a model.
12+
#
13+
# Defaults policy: enabled by default. ConditionPathIsDirectory guards
14+
# the config dir; if /etc/mios/searxng/ doesn't exist (incomplete
15+
# bootstrap) the unit no-ops at pre-boot rather than crash-looping.
16+
17+
[Unit]
18+
Description='MiOS' SearXNG metasearch (privacy-respecting search proxy)
19+
After=network-online.target
20+
Wants=network-online.target
21+
ConditionPathIsDirectory=/etc/mios/searxng
22+
23+
[Container]
24+
# Multi-arch index pin -- the @sha256 covers amd64, arm64, and armv7
25+
# manifests via the OCI image index, so a single digest works across
26+
# every host shape MiOS targets.
27+
Image=docker.io/searxng/searxng:latest@sha256:885f1cd1bb86d759aa4724a1986a61c000292823ff8eeb17d34de1a8acb74477
28+
ContainerName=mios-searxng
29+
Network=mios.network
30+
# 8888 host -> 8080 container. 8080 is taken by mios-ai (LocalAI's
31+
# OpenAI-compatible endpoint), so SearXNG goes on the next conventional
32+
# search-proxy port. Sibling Quadlets on mios.network reach it as
33+
# http://mios-searxng:8080/ without going through host loopback.
34+
PublishPort=8888:8080
35+
36+
# Persistent state: settings.yml + uwsgi.ini live under /etc/searxng;
37+
# the container expects them at /etc/searxng inside. We bind-mount the
38+
# host's /etc/mios/searxng read-write so the operator (and SearXNG's
39+
# own first-run secret_key generator) can persist edits across image
40+
# rebuilds. /var/cache/mios/searxng holds the on-disk results cache so
41+
# a restart doesn't repeat queries that the upstream engines have
42+
# already answered.
43+
Volume=/etc/mios/searxng:/etc/searxng:Z
44+
Volume=/var/cache/mios/searxng:/var/cache/searxng:Z
45+
46+
# Identity. UID 818 is pinned in usr/lib/sysusers.d/50-mios-services.conf
47+
# so /etc/mios/searxng and /var/cache/mios/searxng ownership stays
48+
# stable across image rebuilds. The upstream SearXNG image's `searxng`
49+
# user inside the container is uid 977; we're overriding it so the
50+
# host-side bind-mounts are owned by mios-searxng (818) and the
51+
# container process can still read+write because the volumes are
52+
# chowned 818:818 by usr/lib/tmpfiles.d/mios-searxng.conf at boot.
53+
User=818
54+
Group=818
55+
56+
# Public-facing URL. SearXNG uses this as the canonical base for
57+
# generated absolute links (RSS feeds, opensearch.xml, etc.). Operators
58+
# fronting SearXNG behind a reverse proxy override this in
59+
# /etc/mios/searxng/settings.yml -> server.base_url.
60+
Environment=SEARXNG_BASE_URL=http://localhost:8888/
61+
Environment=SEARXNG_BIND_ADDRESS=0.0.0.0:8080
62+
63+
# Limit log volume; SearXNG is chatty per-query.
64+
Environment=SEARXNG_LOG_LEVEL=WARNING
65+
66+
# OCI image labels for Podman Desktop. Values MUST NOT contain
67+
# whitespace -- Quadlet's Label= parser word-splits on spaces and
68+
# emits each word as a separate --label arg, breaking the run line.
69+
Label=org.opencontainers.image.title=mios-searxng
70+
Label=org.opencontainers.image.url=http://localhost:8888/
71+
Label=org.opencontainers.image.documentation=https://docs.searxng.org/
72+
Label=io.podman_desktop.openInBrowser=http://localhost:8888/
73+
74+
[Service]
75+
Restart=on-failure
76+
RestartSec=10s
77+
TimeoutStartSec=300s
78+
Delegate=yes
79+
80+
[Install]
81+
WantedBy=multi-user.target default.target

usr/lib/systemd/system-preset/90-mios.preset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ enable greenboot-rpm-ostree-grub2-check-fallback.service
4646
enable greenboot-status.service
4747
enable redboot-auto-reboot.service
4848
enable cockpit.socket
49+
enable mios-searxng.service
4950
# user@1000.service starts the per-user systemd manager + user D-Bus
5051
# session bus for the 'mios' user (uid 1000, pinned in
5152
# /usr/lib/sysusers.d/10-mios.conf). Normally systemd-logind reads

usr/lib/sysusers.d/50-mios-services.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ g mios-ollama 815
1515
u mios-ollama 815:mios-ollama "'MiOS' Ollama" /var/empty /usr/sbin/nologin
1616
g mios-forge 816
1717
u mios-forge 816:mios-forge "'MiOS' Forge (Forgejo)" /var/empty /usr/sbin/nologin
18+
# 817 is allocated to mios-ai in 50-mios-ai.conf (separate file because
19+
# the AI subsystem ships its own sysusers/tmpfiles unit pair).
20+
g mios-searxng 818
21+
u mios-searxng 818:mios-searxng "'MiOS' SearXNG metasearch" /var/empty /usr/sbin/nologin
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# /usr/lib/tmpfiles.d/mios-searxng.conf
2+
# 'MiOS' SearXNG metasearch -- runtime directories.
3+
#
4+
# /etc/mios/searxng config dir (settings.yml, uwsgi.ini)
5+
# /var/cache/searxng on-disk result cache (per-user TTL)
6+
#
7+
# UID 818 is pinned in /usr/lib/sysusers.d/50-mios-services.conf and
8+
# referenced by etc/containers/systemd/mios-searxng.container's
9+
# User=818/Group=818 directives. Both directories must already be
10+
# chowned 818:818 before the Quadlet starts, otherwise the container's
11+
# uwsgi worker can't write its socket / cache files and exits with EACCES.
12+
13+
d /etc/mios/searxng 0750 mios-searxng mios-searxng -
14+
d /var/cache/mios/searxng 0750 mios-searxng mios-searxng -
15+
# Vendor settings.yml is shipped at /usr/share/mios/searxng/settings.yml
16+
# and copied into /etc/mios/searxng/ on first boot if no operator copy
17+
# exists. C= is "create-if-absent and copy from source" -- it never
18+
# overwrites an existing file, so a hand-edited settings.yml survives.
19+
C /etc/mios/searxng/settings.yml 0640 mios-searxng mios-searxng - /usr/share/mios/searxng/settings.yml

usr/libexec/mios/mios-dashboard.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,15 @@ print_endpoints() {
242242
"$C_GRY" "${MIOS_LINUX_USER:-mios}" "${MIOS_DEV_DEFAULT_PASSWORD:-mios}" "$C_R"
243243
printf ' %s Ollama %shttp://localhost:11434%s\n' \
244244
"$(ep_dot http://localhost:11434/)" "$C_D" "$C_R"
245+
printf ' %s Search %shttp://localhost:8888/%s\n' \
246+
"$(ep_dot http://localhost:8888/)" "$C_D" "$C_R"
245247
}
246248

247249
print_quadlets() {
248250
section_header "Quadlet services"
249251
local svc info name dot color
250252
for svc in mios-ai mios-forge mios-forgejo-runner mios-cockpit-link \
251-
mios-ceph mios-k3s ollama crowdsec-dashboard \
253+
mios-ceph mios-k3s ollama mios-searxng crowdsec-dashboard \
252254
mios-guacamole guacd guacamole-postgres; do
253255
info="$(service_status "${svc}.service")"
254256
IFS='|' read -r name dot color <<< "$info"

usr/share/mios/env.defaults

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ MIOS_FORGE_VERSION="12"
4646
MIOS_FORGE_IMAGE="codeberg.org/forgejo/forgejo:12"
4747
MIOS_FORGE_HTTP_PORT="3000"
4848
MIOS_FORGE_SSH_PORT="2222"
49+
MIOS_SEARXNG_VERSION="latest"
50+
MIOS_SEARXNG_IMAGE="docker.io/searxng/searxng:latest"
51+
MIOS_SEARXNG_PORT="8888"
52+
MIOS_SEARXNG_USER="mios-searxng"
53+
MIOS_SEARXNG_UID="818"
54+
MIOS_SEARXNG_GID="818"
4955

5056
# ── AI inference (LAW 5: localhost OpenAI-compatible only) ────────────────────
5157
# Default model set researched for the 12 GB system-RAM workstation

usr/share/mios/mios.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ format = "toml"
134134
spec_url = "https://toml.io/en/v1.0.0"
135135
editor_url = "/usr/share/mios/configurator/index.html"
136136

137+
[search]
138+
# Local privacy-respecting metasearch (SearXNG). Always-on Quadlet at
139+
# etc/containers/systemd/mios-searxng.container; the agent surface
140+
# (usr/share/mios/ai/v1/tools.json) can plug into this as a localhost
141+
# `web_search` tool target without breaking Architectural Law 5 -- a
142+
# search proxy is not a model, so no UNIFIED-AI-REDIRECTS exception
143+
# is required.
144+
endpoint = "http://localhost:8888/"
145+
enable = true
146+
137147
[ai]
138148
endpoint = "http://localhost:8080/v1"
139149
model = "qwen2.5-coder:7b"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# /usr/share/mios/searxng/settings.yml
2+
# 'MiOS' SearXNG vendor defaults.
3+
#
4+
# This file is copied into /etc/mios/searxng/settings.yml on first boot
5+
# by usr/lib/tmpfiles.d/mios-searxng.conf (C= line: copy-if-absent).
6+
# Once present in /etc, operator edits survive every subsequent boot.
7+
# To restore vendor defaults: rm /etc/mios/searxng/settings.yml +
8+
# `systemctl restart systemd-tmpfiles-setup.service`.
9+
#
10+
# secret_key is left as the placeholder PLACEHOLDER_SECRET_KEY_REGENERATE_ON_FIRST_BOOT;
11+
# the SearXNG entrypoint detects this sentinel and overwrites it with a
12+
# fresh 64-char value on container startup, then never touches it again.
13+
14+
use_default_settings: true
15+
16+
general:
17+
instance_name: "MiOS Search"
18+
privacypolicy_url: false
19+
donation_url: false
20+
contact_url: false
21+
enable_metrics: false
22+
23+
server:
24+
base_url: "http://localhost:8888/"
25+
port: 8080
26+
bind_address: "0.0.0.0"
27+
# Filled in at first-boot by SearXNG's entrypoint.
28+
secret_key: "PLACEHOLDER_SECRET_KEY_REGENERATE_ON_FIRST_BOOT"
29+
limiter: false
30+
image_proxy: true
31+
http_protocol_version: "1.0"
32+
method: "GET"
33+
default_http_headers:
34+
X-Content-Type-Options: nosniff
35+
X-Download-Options: noopen
36+
X-Robots-Tag: noindex, nofollow
37+
Referrer-Policy: no-referrer
38+
39+
ui:
40+
static_use_hash: true
41+
default_locale: "en"
42+
query_in_title: false
43+
infinite_scroll: false
44+
center_alignment: false
45+
theme_args:
46+
simple_style: dark
47+
48+
search:
49+
safe_search: 0
50+
autocomplete: "duckduckgo"
51+
default_lang: "en"
52+
formats:
53+
- html
54+
- json # required for the agent web_search tool surface
55+
56+
# Engines: keep upstream defaults; operators tune on a per-instance
57+
# basis under /etc/mios/searxng/settings.yml. Comment block here so
58+
# the vendor copy is short and the diff against upstream is auditable.

0 commit comments

Comments
 (0)