diff --git a/machines/hermes/hardware.nix b/machines/hermes/hardware.nix index 3f491d9..31c60b0 100644 --- a/machines/hermes/hardware.nix +++ b/machines/hermes/hardware.nix @@ -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 + ''; } diff --git a/machines/hermes/off.orp b/machines/hermes/off.orp new file mode 100644 index 0000000..38e4ba1 Binary files /dev/null and b/machines/hermes/off.orp differ