Hey, folks, I was trying to set up openrgb on NixOS. My initial assumption was that all I have to do was add this to systemPackages and I will be done. That does not seem to be the case.
One of the devs of openrgb made a tutorial on how to configure this on Linux. Vide Link. What is the nix way to do this?
I have added openrgb and i2c-tools to the config. Next the person suggests to copy a file to udev rules, which I added to the /etcnixos/configuration.nix file like
services.udev.extraRules = ''
${builtins.readFile ./60-openrgb.rules}
'';
where I have this file in the same folder as my config files.
This creates a file by the name of 99-local.rules in /etc/udev/rules.d - Does naming matter for a udev file? Afterwards, he suggests to execute:
sudo udevadm control --reload-rules
sudo udevadm trigger
If I do nixos-rebuild will it automatically do these? Doing so outputs the following. Now what I don’t understand is that is this the same as the above operation?
stopping the following units: systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service
activating the configuration...
setting up /etc...
reloading user units for sherub...
setting up tmpfiles
starting the following units: systemd-udevd-control.socket, systemd-udevd-kernel.socket
They the video proceeds to setup i2c-dev
sudo modprobe i2c-dev
sudo modprobe i2c-piix4
When I execute these I get following errors
❯ sudo modprobe i2c-dev
modprobe: can't change directory to '/lib/modules': No such file or directory
❯ sudo modprobe i2c-piix4
modprobe: can't change directory to '/lib/modules': No such file or directory
❯ sudo i2cdetect -l
i2cdetect: can't open '/sys/class/i2c-dev': No such file or directory
First and foremost this feels non-nixy. What is the nix way of achieving this? Also, what do these errors mean and how to resolve these?
Should the nix derivation of this package take care of all this stuff?
[EDIT]: After a restart, openrgb was able to detect the motherboard. It was not able to find the AMD cooler (stock) and the RAM-sticks (Corsaier vengeance).
I believe which answers the question that the naming in udev rules file is inconsequential.