Repository navigation
Description
Problem
Every daemon setting lives in config.toml, so changing a retention period or a preview limit means editing a file on the host and restarting. Notification destinations moved into the API (0029), but that migration made the configuration reject the old table, which broke existing configurations. There is no rule for what belongs where.
Proposed solution
A rule. config.toml keeps bootstrap settings and facts about the host: what the daemon needs before its database opens, or what NixOS owns. Policy moves into the database and becomes editable through the API, CLI and dashboard.
Stays in config.toml |
Moves into the daemon |
|---|---|
server.*, docker.*, tailscale.*, telemetry.* |
retention.*, build_history.* |
dns.providers, ingress.enabled, ingress.private, ingress.tunnel, ingress.public_addresses, ingress.webhook_hostname |
images.*, previews.*, checkouts.max_bytes, snapshots.max_upload_bytes |
| credential files, storage pools | reconciliation.*, auth.max_token_days, ingress.acme.email, backup settings (control-plane backups) |
Pinning. A setting present in config.toml is pinned: the API reports it as managed by configuration and refuses to change it (setting_pinned). An absent one takes its stored value, or its default. NixOS users keep a fully declarative configuration through services.piqueld.settings, everyone else edits through the API, and no existing configuration breaks.
One declaration. A single typed Settings struct, declared once through a macro that generates storage, validation, the API, piquelctl settings list|get|set|reset, the dashboard form and the generated reference. Changes apply without a restart, are journaled, and recorded in the audit trail.
Settings in the database are part of the control-plane backup (#127), so backing up the daemon captures nearly all of its configuration.
[snapshots] stops being a separate section only because older clients reject unknown [previews] fields: the settings API reports each setting on its own.
Written with Claude Opus 5.5 in Claude Code (via T3 Code).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsUp Next
Activity