Your 'Systant. A system daemon on Linux that communicates via MQTT to get diagnostic info from, and send commands to, a Linux computer.
Written in Elixir because fuck you, and written mostly by Claude because fuck everything.
- 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>
|
||
|---|---|---|
| config | ||
| lib | ||
| rel | ||
| test | ||
| .formatter.exs | ||
| .gitignore | ||
| debug-nix-store.sh | ||
| mix.exs | ||
| mix.lock | ||
| nixos-module.nix | ||
| README.md | ||
| systant-manual.nix | ||
| systant-old.nix | ||
| systant-wrapper.nix | ||
| systant.nix | ||
| systant.service | ||
Systant
An Elixir application that runs as a systemd daemon to:
- Publish system stats to MQTT every 30 seconds
- Listen for commands over MQTT and log them to syslog
Configuration
Edit config/config.exs to configure MQTT connection:
config :systant, Systant.MqttClient,
host: "localhost",
port: 1883,
client_id: "systant",
username: nil,
password: nil,
stats_topic: "system/stats",
command_topic: "system/commands",
publish_interval: 30_000
Building
mix deps.get
mix compile
Running
# Development
mix run --no-halt
# Production release
MIX_ENV=prod mix release
_build/prod/rel/systant/bin/systant start
Systemd Installation
- Build production release
- Copy binary to
/usr/local/bin/ - Copy
systant.serviceto/etc/systemd/system/ - Enable and start:
sudo systemctl enable systant
sudo systemctl start systant
Features
- Publishes "Hello from systant" stats every 30 seconds to
system/statstopic - Listens on
system/commandstopic and logs received messages - Configurable MQTT connection settings
- Runs as systemd daemon with auto-restart
- Logs to system journal