hermes: Fix OpenRGB on startup

This commit is contained in:
Paul-Mathias Logue 2025-12-14 15:24:39 +01:00
parent 4abedcce78
commit 203f055aad
2 changed files with 7 additions and 18 deletions

View file

@ -1,14 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
let
no-rgb = pkgs.writeScriptBin "no-rgb" ''
#!/bin/sh
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --list-devices | grep -E '^[0-9]+: ' | wc -l)
for i in $(seq 0 $(($NUM_DEVICES - 1))); do
${pkgs.openrgb}/bin/openrgb --device $i --mode static --color 000000
done
'';
in
{ {
# I2C # I2C
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -34,12 +25,10 @@ in
enable = true; enable = true;
startupProfile = "off"; startupProfile = "off";
}; };
# systemd.services.no-rgb = {
# description = "no-rgb"; system.activationScripts.openrgbOff = ''
# serviceConfig = { mkdir -p /var/lib/OpenRGB
# ExecStart = "${no-rgb}/bin/no-rgb"; cp ${./off.orp} /var/lib/OpenRGB/off.orp
# Type = "oneshot"; chmod 0644 /var/lib/OpenRGB/off.orp
# }; '';
# wantedBy = [ "multi-user.target" ];
# };
} }

BIN
machines/hermes/off.orp Normal file

Binary file not shown.