Setting up g810-led udev rules on NixOS
I have a Logitech g512 carbon keyboard and I wanted to control the LEDs on the keyboard. Thankfully there's g810-led which handles this for a number of similar Logitech keyboards.
It's easy to install on NixOS, just add the g810-led package to your nix config. After it's installed, you can
set up a profile which will be executed on startup creating the file /etc/g810-led/profile
and adding
fx hwave all 2
for instance. You may have to create the /etc/g810-led
directory if it doesn't
exist.
It'd be nice if we didn't have to run g810-led as root. This can be solved with the provided udev rules.
Returning to your nix config, add
services.udev.packages = with pkgs; [ g810-led ];
and now you should be able to control the keyboard LEDs!