You must log in or # to comment.
Interesting. I wonder if you can define a udev rule with the S/N of the device and have a delcarative NixOS definition for that. I found my weekend project!
It seems like it would be a lot simpler to have a udev rule that triggers when the specific device is removed and runs the forced reboot. That way you don’t have an extra daemon running, and you can trigger on other devices too, for instance, your mouse.


