pianonix: try getting piano-led-visualizer to run

Still did not work, using raspberrypi os
This commit is contained in:
2025-12-06 09:20:52 +01:00
parent 194d4bcec0
commit a12b50edfa
5 changed files with 54 additions and 13 deletions

View File

@@ -26,6 +26,26 @@
../common/optional/avahi.nix
];
environment.systemPackages = [
(pkgs.python3.withPackages (p:
with p; [
numpy
pillow
flask
rpi-gpio
webcolors
psutil
mido
rtmidi-python
spidev
waitress
websockets
werkzeug
pkgs.frajul.rpi-ws281x-python
]))
];
# disko.devices.disk.main.device = "/dev/mmcblk1";
# enabled by fish, disabling speeds up builds
@@ -169,7 +189,7 @@
};
};
networking.firewall.enable = true;
networking.firewall.enable = false;
networking.firewall.allowedTCPPorts = [
5900 # for vnc
];
@@ -201,7 +221,7 @@
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = true;
hardware.deviceTree = {
enable = true;
filter = lib.mkForce "*-rpi-*.dtb";
filter = lib.mkForce "*-rpi-4*.dtb";
overlays = [
{
name = "spi";
@@ -234,4 +254,23 @@
## My own Piano LED Visualizer
services.piano-led-visualizer.enable = true;
## Crude fix for avahi
systemd.timers.avahiRestart = {
description = "Restart avahi-daemon every 5 minutes";
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "5min";
OnUnitActiveSec = "5min";
Unit = "avahiRestart.service";
};
};
systemd.services.avahiRestart = {
description = "Restart avahi-daemon service";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl restart avahi-daemon.service";
};
};
}