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,15 +1,6 @@
{ 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
environment.systemPackages = with pkgs; [
i2c-tools
@ -34,12 +25,10 @@ in
enable = true;
startupProfile = "off";
};
# systemd.services.no-rgb = {
# description = "no-rgb";
# serviceConfig = {
# ExecStart = "${no-rgb}/bin/no-rgb";
# Type = "oneshot";
# };
# wantedBy = [ "multi-user.target" ];
# };
system.activationScripts.openrgbOff = ''
mkdir -p /var/lib/OpenRGB
cp ${./off.orp} /var/lib/OpenRGB/off.orp
chmod 0644 /var/lib/OpenRGB/off.orp
'';
}

BIN
machines/hermes/off.orp Normal file

Binary file not shown.