diff options
Diffstat (limited to 'hosts/local/master/rgb.nix')
-rw-r--r-- | hosts/local/master/rgb.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hosts/local/master/rgb.nix b/hosts/local/master/rgb.nix new file mode 100644 index 0000000..66dbbfb --- /dev/null +++ b/hosts/local/master/rgb.nix @@ -0,0 +1,30 @@ +{ + pkgs, + lib, + ... +}: let + no-rgb = pkgs.writeScriptBin "no-rgb" '' + #!/bin/sh + NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l) + + for i in $(seq 0 $(($NUM_DEVICES - 1))); do + ${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000 + done + ''; +in { + # config = { + # services.udev.packages = [pkgs.openrgb]; + services.hardware.openrgb.enable = true; + # boot.kernelModules = ["i2c-dev"]; + # hardware.i2c.enable = true; + + # systemd.services.no-rgb = { + # description = "no-rgb"; + # serviceConfig = { + # ExecStart = "${no-rgb}/bin/no-rgb"; + # Type = "oneshot"; + # }; + # wantedBy = ["multi-user.target"]; + # }; + # }; +} |