nix-community / lorri

Your project’s nix-env [maintainer=@Profpatsch,@nyarly]
Apache License 2.0
638 stars 24 forks source link

Lorri daemon does not start automatically with systemd #72

Closed jthulhu closed 2 years ago

jthulhu commented 2 years ago

Lorri requires a running daemon, which is expected to be managed by systemd. However, systemd refuses to start lorri, as it claims lorri is configured to refuse manual start/stop, and is by default loaded but inactive. Launching lorri's daemon via command line works.

To Reproduce

  1. Install lorri via home-manager, stable
  2. Run systemctl --user daemon-reload as indicated (or reboot)
  3. Create a new directory, do lorri init, then direnv allow
  4. Lorri will immediately prompt a warning, stating that 'lorri daemon is not running and this project has not yet been evaluated, please run lorri daemon'

Expected behavior The daemon should not be handled by hand, but automatically started by anyone (systemd, lorri itself, ...) but me.

Metadata OS: NixOS 21.05 / Kernel 5.10.66 Lorri: Lorri 1.5 (installed via home-manager, stable channel)

SuperSandro2000 commented 2 years ago

lorri is socket activated. If anything accesses the socket the daemon is started by systemd.

jthulhu commented 2 years ago

Yes, but my issue is not that I can't start manually lorri, it's that when I open a project and that lorri is supposedly running, it prints lorri daemon is not running and this project has not yet been evaluated, please run lorri daemon.

However, in the past few days, I could not reproduce this issue anymore (ie. lorri started working as expected)...

SuperSandro2000 commented 2 years ago

This happens if you install lorri for the first time and the socket is not created yet. Either reload your user session or run: systemctl --user start lorri.socket.

jthulhu commented 2 years ago

I suggest you change the README then, since there it's written that the solution is systemctl --user daemon-reload, which did not work for me. Or is it an other issue?

SuperSandro2000 commented 2 years ago

There is already a note about this and it says if ddaemon-reload does not work reboot.

jthulhu commented 2 years ago

Fine.