How shark-empire/mitos-settings works
MITOS Settings is a system-settings product with a shared typed settings core, three user-facing entry points (CLI, text navigator, GTK app), and a privileged Unix-socket daemon. The primary workflow is to browse or address a setting, validate and authorize a change, persist it, and—where applicable—apply it to Linux or project selected settings to home.conf. The README documents grants and live synchronization as additional capabilities. Sampled source confirms several call paths; links for unsampled subsystems follow explicit README documentation, and uncertain wiring is omitted.
Main entry points: manager.rs Settings manager · server.rs Unix IPC server · mod.rs Category registry · service_client.rs Grant service client
Components 25
User interfaces
- CLI commands
src/cli/mod.rs - Text navigator
src/app/application.rs - GTK app
gui/src/main.rs
Settings core
- Settings manager
src/settings/manager.rs - Category registry
src/categories/mod.rs - Typed schema
src/settings/schema.rs - Value validation
src/settings/validation.rs - Settings persistence
src/settings/persistence.rs - Change history
src/settings/history.rs
Privileged IPC
- Daemon entry
src/main.rs - Unix IPC server
src/ipc/server.rs - IPC client
src/ipc/client.rs - Peer authorization
src/ipc/permissions.rs
System integration
- Hardware readers
src/hardware/mod.rs - System services
src/services/mod.rs - Linux commands
src/platform/linux.rs
Permissions and sync
- Grant service client
src/grants/service_client.rs - Grant model
src/grants/model.rs - Desktop config projection
src/services/home_conf.rs - Change event bus
src/notifications/events.rs
Other components
- Settings user
- Linux system
- mitos-service
- MITOS desktop apps
- Grant user
Connections 33
- Settings user → CLI commands: runs commands
- Settings user → Text navigator: navigates settings
- Settings user → GTK app: uses app
- CLI commands → Settings manager: reads and writes
- Text navigator → Settings manager: reads and writes
- GTK app → Settings manager: reads and writes
- Settings manager → Category registry: registers categories
- Category registry → Typed schema: registers settings
- Settings manager → Typed schema: looks up keys
- Settings manager → Value validation: validates changes
- Settings manager → Settings persistence: loads and saves
- Settings manager → Change history: records and reads
- Settings manager → IPC client: forwards privileged writes
- Daemon entry → Settings manager: loads authority manager
- Daemon entry → Unix IPC server: starts server
- Unix IPC server → Peer authorization: authenticates peer
- Unix IPC server → Settings manager: dispatches settings requests
- IPC client → Unix IPC server: sends requests
- GTK app → IPC client: subscribes to changes
- Category registry → Hardware readers: reads live information
- Category registry → System services: reads live information
- System services → Linux commands: runs system tools
- Hardware readers → Linux system: reads proc and sys
- Linux commands → Linux system: applies changes
- Settings manager → Desktop config projection: projects selected settings
- Desktop config projection → MITOS desktop apps: writes home.conf
- Settings manager → Change event bus: publishes changes
- Unix IPC server → Change event bus: relays change notices
- CLI commands → Grant service client: executes grant commands
- Unix IPC server → Grant service client: dispatches grant requests
- Grant service client → Grant model: parses grant data
- Grant service client → mitos-service: sends grant requests
- Grant user → mitos-service: answers elevation prompt