This repository provides a NixOS package and service for the Framework 16 LED Matrix System Monitor. It includes robustness improvements and easy NixOS integration.
- Complete NixOS Integration: Flake with module support for easy system integration
- Robust Error Handling: Graceful degradation when hardware is unavailable or permissions are denied
- Configurable Service: Systemd service with full configuration options
- Plugin Support: Extensible plugin framework for additional functionality
- Framework Hardware Support: Specifically designed for Framework 16 LED Matrix panels
Add this to your NixOS configuration:
# configuration.nix or any imported module
{ config, pkgs, ... }:
let
led-matrix-monitoring = pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "timoteuszelle";
repo = "led-matrix";
rev = "fix/robustness-and-permission-handling"; # Use latest commit hash
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Replace with actual hash
} + "/default.nix") {};
in
{
environment.systemPackages = [ led-matrix-monitoring ];
}Then run manually:
led-matrix-monitor --help
led-matrix-monitor --top-left cpu --bottom-left mem-bat --top-right disk --bottom-right netAdd to your flake.nix:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# ... your other inputs
led-matrix-monitoring = {
url = "github:timoteuszelle/led-matrix/fix/robustness-and-permission-handling";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, led-matrix-monitoring, ... }:
{
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
led-matrix-monitoring.nixosModules.led-matrix-monitoring
];
};
};
}Add to your configuration.nix:
{ config, lib, pkgs, ... }:
{
# Enable the LED Matrix Monitoring service
services.led-matrix-monitoring = {
enable = true;
# Configure what shows in each quadrant
topLeft = "cpu"; # CPU utilization
bottomLeft = "mem-bat"; # Memory usage + battery status
topRight = "disk"; # Disk I/O rates
bottomRight = "net"; # Network upload/download
# Optional: disable keyboard listener (Alt+I shortcut)
# disableKeyListener = true;
# Optional: disable plugins
# disablePlugins = true;
# Optional: run as different user (default: root)
# user = "your-username";
};
}sudo nixos-rebuild switch --flake .#your-hostnameEach quadrant can display:
cpu: CPU utilization percentagemem-bat: Memory usage and battery charge/statusdisk: Disk read/write I/O ratesnet: Network upload/download ratestemp: Temperature sensor readings (plugin)fan: Fan speed readings (plugin)none: Disabled/blank
services.led-matrix-monitoring = {
enable = true; # Enable the service
topLeft = "cpu"; # Top-left quadrant
bottomLeft = "mem-bat"; # Bottom-left quadrant
topRight = "disk"; # Top-right quadrant
bottomRight = "net"; # Bottom-right quadrant
disableKeyListener = false; # Disable Alt+I app identification
disablePlugins = false; # Disable plugin system
user = "root"; # User to run service as
};Run directly with custom options:
# Show help
led-matrix-monitor --help
# Custom configuration
led-matrix-monitor \
--top-left cpu \
--bottom-left mem-bat \
--top-right temp \
--bottom-right fan \
--no-key-listener- Alt+I: Display application names in each quadrant while pressed
- Use
--no-key-listenerordisableKeyListener = trueto disable
For keyboard functionality:
- Service runs as
rootby default (recommended) - If running as user, they'll be added to
inputgroup automatically - Consider security implications of
inputgroup membership
systemctl status led-matrix-monitoringjournalctl -u led-matrix-monitoring -f# Should show help even without LED matrices
led-matrix-monitor --help-
"No LED devices found": LED Matrix panels not detected
- Check USB connections
- Verify Framework 16 with LED Matrix input modules
-
Permission errors: Input device access denied
- Service automatically handles this when running as root
- For user mode, automatic
inputgroup membership is configured
-
Module import errors: Missing dependencies
- All dependencies are automatically handled by Nix
- Try rebuilding:
nix build github:timoteuszelle/led-matrix/fix/robustness-and-permission-handling
git clone https://github.com/timoteuszelle/led-matrix.git
cd led-matrix
nix develop # Enter development shell with all dependencies
python led_system_monitor.py --helpnix build github:timoteuszelle/led-matrix/fix/robustness-and-permission-handling
./result/bin/led-matrix-monitor --helpThis is a fork of the original FW_LED_System_Monitor with NixOS packaging and robustness improvements.
- Original upstream: MidnightJava/led-matrix
- NixOS integration: timoteuszelle/led-matrix
Contributions welcome for:
- Additional plugins
- NixOS module improvements
- Bug fixes and robustness improvements
- Documentation updates
MIT License (assuming - verify with original project)
- Framework 16 laptop
- LED Matrix Input Module(s) installed
- NixOS operating system