ARADR-002: Unified Nix + standalone configuration #4

Closed
opened 2026-08-29 12:21:37 +00:00 by lost-rob0t · 1 comment
lost-rob0t commented 2026-08-29 12:21:37 +00:00 (Migrated from github.com)

Goal

Make llm-log configurable through either Nix/Home Manager or a normal standalone config file without changing proxy semantics.

Auto-ARADR decision

Use one canonical runtime configuration model with two frontends:

  1. Nix/Home Manager — services.llm-log.enable = true creates the systemd user service and existing module options remain declarative.
  2. Standalone — llm-log serve loads TOML from $XDG_CONFIG_HOME/llm-log/config.toml (fallback ~/.config/llm-log/config.toml) when present; --config PATH selects an explicit file.

CLI values override config-file values. Repeatable --upstream NAME=URL entries override/add individual configured upstreams. Standalone capture data defaults to $XDG_DATA_HOME/llm-log (fallback ~/.local/share/llm-log) so Nix and non-Nix defaults agree.

The flake must continue exposing the package + Home Manager module and should expose a runnable app so nix run ... -- serve works without installation.

RED-first acceptance

Before implementation, tests must fail proving the current CLI cannot:

  • load standalone TOML configuration;
  • honor XDG config/data defaults;
  • apply CLI-over-config precedence;
  • merge per-provider CLI upstream overrides with configured upstreams.

Acceptance criteria

  • llm-log serve --config /path/config.toml works.
  • Default config path is XDG-compliant and missing default config is allowed.
  • An explicitly requested missing config is an error.
  • Config supports listener address, port, data directory, Prolog classifier toggle, and upstream map.
  • CLI overrides config values deterministically.
  • No secrets are required in the Nix store; upstream auth remains client-forwarded.
  • Home Manager still supports services.llm-log.enable = true and configurable systemd user service options.
  • Flake exposes package, Home Manager module, checks, dev shell, and runnable app.
  • README documents Nix/Home Manager and non-Nix configuration paths.
  • Full unittest/Nix package checks stay green.

Non-goals

  • TLS MITM/system-wide interception
  • provider/model routing policy
  • search/tool injection
  • secret/key storage
  • UI
## Goal Make llm-log configurable through either Nix/Home Manager or a normal standalone config file without changing proxy semantics. ## Auto-ARADR decision Use one canonical runtime configuration model with two frontends: 1. **Nix/Home Manager** — `services.llm-log.enable = true` creates the systemd user service and existing module options remain declarative. 2. **Standalone** — `llm-log serve` loads TOML from `$XDG_CONFIG_HOME/llm-log/config.toml` (fallback `~/.config/llm-log/config.toml`) when present; `--config PATH` selects an explicit file. CLI values override config-file values. Repeatable `--upstream NAME=URL` entries override/add individual configured upstreams. Standalone capture data defaults to `$XDG_DATA_HOME/llm-log` (fallback `~/.local/share/llm-log`) so Nix and non-Nix defaults agree. The flake must continue exposing the package + Home Manager module and should expose a runnable app so `nix run ... -- serve` works without installation. ## RED-first acceptance Before implementation, tests must fail proving the current CLI cannot: - load standalone TOML configuration; - honor XDG config/data defaults; - apply CLI-over-config precedence; - merge per-provider CLI upstream overrides with configured upstreams. ## Acceptance criteria - `llm-log serve --config /path/config.toml` works. - Default config path is XDG-compliant and missing default config is allowed. - An explicitly requested missing config is an error. - Config supports listener address, port, data directory, Prolog classifier toggle, and upstream map. - CLI overrides config values deterministically. - No secrets are required in the Nix store; upstream auth remains client-forwarded. - Home Manager still supports `services.llm-log.enable = true` and configurable systemd user service options. - Flake exposes package, Home Manager module, checks, dev shell, and runnable app. - README documents Nix/Home Manager and non-Nix configuration paths. - Full unittest/Nix package checks stay green. ## Non-goals - TLS MITM/system-wide interception - provider/model routing policy - search/tool injection - secret/key storage - UI
lost-rob0t commented 2026-08-30 00:39:43 +00:00 (Migrated from github.com)

Closed as superseded by the zero-Python migration. The still-required Common Lisp config/CLI + Nix/non-Nix packaging contract is now owned by #10 under the #20 correction; the older Python-oriented implementation path should not be treated as canonical.

Closed as superseded by the zero-Python migration. The still-required Common Lisp config/CLI + Nix/non-Nix packaging contract is now owned by #10 under the #20 correction; the older Python-oriented implementation path should not be treated as canonical.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#4
No description provided.