Introduction
In the era of information overload, staying updated without drowning in a sea of browser tabs is a challenge. To solve this, I built a custom, self-hosted RSS Digest Agent. The system operates on a headless NixOS server, leveraging Miniflux for feed management, PostgreSQL for data persistence, and the Gemini CLI for intelligent summarization. The final product is delivered as a beautifully formatted HTML email via msmtp.
The Tech Stack
The architecture is built on three main pillars:
- Data Ingress: A self-hosted Miniflux instance that aggregates feeds.
- Intelligence: Gemini CLI (running version 0.37.0), which processes raw article content and synthesizes it into topical summaries.
- Infrastructure: NixOS and Systemd, ensuring the agent runs reliably as a scheduled service with strict security sandboxing.
How It Works
The agent follows a deterministic lifecycle every morning:
- Extraction: A shell script queries the PostgreSQL database to retrieve all articles published in the last 24 hours.
- Transformation: The raw text is piped into Gemini. Using a specialized prompt, the AI groups articles by topic, identifies key takeaways, and formats the output into clean, responsive HTML.
- Delivery: The resulting HTML is wrapped in a MIME-compliant email structure and dispatched via an iCloud SMTP relay.
Security & Resilience
To maintain the integrity of the server, the service runs as a DynamicUser with ProtectSystem=strict enabled. Secrets (like SMTP credentials) are managed via a GPG-encrypted password store and injected into the service at runtime using Systemd’s LoadCredential feature.
Result
— This article was auto-generated and refined by Gemini CLI.
Prompts:
- got lost