I’m trying to auto-start lirc for use with Kodi. I think I figured out the proper Nix way to do this, but I’m getting an unexpected error. First, here’s my config:
Please check my syntax - I’m not 100% sure I did that correctly, but it seems to configure everything correctly.
Upon reboot I get a new lircd.socket service. However, when trying to use it I get this (via journalctl):
May 26 23:35:30 htpc systemd[1]: Starting LIRC daemon socket...
May 26 23:35:30 htpc systemd[1]: Listening on LIRC daemon socket.
May 26 23:36:29 htpc systemd[1]: lircd.socket: Failed with result 'service-start-limit-hit'
It does that repeatedly, which is probably what’s causing that systemd message.
So… why can’t it create the socket or PID file? I’m guessing the process must be starting up as a non-root user, but I don’t have anything like that defined. Maybe some built-in logic by whatever creates the nix service?
I worked around this for now by giving my kodi user sudo rights to run lircd and kicking it off via an autostart script on login. Gets the job done so I can start using it, but very interested in any suggestions to do this the “right” way.
Thanks for the mention. Definitely still interested in doing this without my workaround. Just to be clear, though, this is an issue with launching lircd as a service. Kodi is consuming it.
but if you’re not using kodi why are you using lirc?
sure, i have used lirc for some interesting things unrelated to kodi many years ago, but i would suggest in the context of nixpkgs the kodi ecosystem is very relevant
i strive for an awesome htpc experience on nixos
on that note i will mention that if you want to step your kodi game up to the next level i can’t recommend flirc products enough, specifically the remote and dongle… light years ahead of what i have used in the past
does flirc provide a way to power on a machine? I’m familiar with it, but from what I can tell they’ve never supported that capability. The closest I’ve seen is waking the PC up from sleep.