- Topics now default to systant/{hostname}/stats and systant/{hostname}/commands
- Runtime config automatically includes system hostname in topics
- NixOS module defaults use config.networking.hostName
- Supports multiple hosts without topic conflicts
- Environment variables can still override if needed
Example: systant/orion/stats, systant/server2/stats, etc.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
431 B
Elixir
16 lines
431 B
Elixir
import Config
|
|
|
|
config :systant, Systant.MqttClient,
|
|
host: "mqtt.home",
|
|
port: 1883,
|
|
client_id: "systant",
|
|
username: "mqtt",
|
|
password: "pleasework",
|
|
stats_topic_base: "systant", # Will become systant/{hostname}/stats
|
|
command_topic_base: "systant", # Will become systant/{hostname}/commands
|
|
publish_interval: 30_000
|
|
|
|
config :logger, :console,
|
|
format: "$time $metadata[$level] $message\n",
|
|
metadata: [:request_id]
|