From a slack discussion about auto-starting talon on login:
https://gist.github.com/fidgetingbits/a9c9d4786dd28c0f5224071280edfb66
Those are auto-generated from my nix config, so there might be some oddities, but should mostly work for others with fixed paths I think. The reason for a watchdog is that talon is still running and spitting stalled warnings to the log, so systemd never actually detects that it needs to be restarted. I think systemd watchdog only works if the running service exits/crashes. So here the separate watchdog service monitors the talon log. This type of stall happens if you make a mistake while developing new features or accidentally run a command that blocks, so is nice to catch it and have it restart without having to go find a keyboard.
From a slack discussion about auto-starting talon on login: