# kb-ingest.service — module 5 phase 3 step 5 (kb/phases/kb-m5-faza3.md §7.1).
# First systemd unit in this repo: deliberately host-level, not a container — the job
# needs simultaneous LAN (Paperless), local DB (kb-postgres@PIHA), and Tailscale (Ollama@
# SOLARIA) access; containerizing it buys nothing here.
#
# Install: copy or symlink this file (and kb-ingest.timer) to /etc/systemd/system/, then
# `systemctl daemon-reload`. See ../README.md "Cyclic ingest (systemd timer)" for the full
# install sequence (venv, .env, kb-ingest-run.sh).
[Unit]
Description=KB cyclic ingest (Paperless adapter + chunk embed + summarize)
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
User=oskar
EnvironmentFile=/opt/homelab/kb/.env
WorkingDirectory=/opt/homelab/kb
ExecStart=/opt/homelab/kb/kb-ingest-run.sh
