This service collects metrics and renders them on Framework 16" LED matrix using LED Matrix Daemon. All in all, it just renders a PNG image with the metrics and sends it to the daemon responsible for rendering it on LED matrix.
Metric collectors:
- CPU usage
- Memory % usage
- Disk IO usage
- Network usage
- CPU Temperature
- Battery Level
Widgets:
- Network/disk plot
- Temperature bar
- Battery level bar
- CPU usage bar per core + average
- Memory usage bar
Add the flake to your NixOS configuration:
{
inputs.led-matrix-monitoring.url = "github:night-crawler/led_matrix_monitoring";
outputs = { self, nixpkgs, led-matrix-monitoring, ... }: {
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
# ...
modules = [
led-matrix-monitoring.nixosModules.default
{
services.led-matrix-monitoring = {
enable = true;
settings = {
# Override default settings from example_config.toml
# Note: socket path is automatically set if led-matrix-daemon is configured
# You only need to set it manually if you want to override the automatic configuration
# socket = "/run/led-matrix/led-matrix.sock";
collector.max_history_samples = 20;
collector.sample_interval = "200ms";
};
};
}
];
};
};
}
yay -S led_matrix_monitoring
Enable daemon with default configuration:
sudo systemctl enable --now led_matrix_monitoring.service
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Check out the repository and build the binary:
git clone https://github.com/night-crawler/led_matrix_monitoring.git
cd led_matrix_monitoring
cargo build --release
Copy the binary to a location in your path:
sudo cp ./target/release/led_matrix_monitoring /usr/local/bin
Take a look at example_config.toml.
In the collector section, everything that takes a list of values will produce an average of those values. You might want to change widget position here and there.