• varnia@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    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!

  • notabot@piefed.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 hours ago

    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.