I’d like to set up homebridge on NixOS. Homebridge is a nodejs server that emulates the Apple HomeKit API to allow for connecting many non-apple-certified devices to the Home app for control. It is distributed as an npm package. It also relies on many plugins which are distributed as npm packages.
What’s the best way to deploy something like this on NixOS? I would like it to start on boot and restart on failure. Do I need to write my own module? If so how do I deal with the highly variable set of npm package plugins?
Thanks!