Raspberry pi 3B: declarative led control

Hey, does anyone know how to control raspberry pi 3 LEDs? I would like to disable them. nixos-hardware has options for this for RPI4, but not for RPI3. I’m already using the kernel for RPI3 and I know I can just echo 0 > /sys/class/leds/PWR/brightness but I would like to do this decoratively and as clean as possible.

Wrote a module, can be found here: nixos/modules/rpi-3-leds.nix at 4e88f7c43ee5ffa9f297e751520d94a7354d4fcb · katexochen/nixos · GitHub

1 Like