gmodena / nix-flatpak

Install flatpaks declaratively
Apache License 2.0
302 stars 10 forks source link

fix(dbus): No medium found #66

Closed jh-devv closed 2 months ago

jh-devv commented 5 months ago

https://github.com/NixOS/nixpkgs/issues/183629 Should fix #65

jh-devv commented 5 months ago

Noticed that this is the same error I had in my own flake. Fixed it with this ^-^

gmodena commented 5 months ago

hey @jh-devv - thanks for this!

I tried to replicate #65, but I don't see any dbus errors on any of my test envs. I use Gnome, and DBUS_SESSION_BUS_ADDRESS is set:

$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus,guid=01b38efe8192276454507e05663647ae

On my systems, the variable is set by the systemd dbus.service unit. It is then imported by my session manager (GDM).Could you maybe check the output of:

systemctl status --user dbus.service

I can see how manually setting DBUS_SESSION_BUS_ADDRESS will fix your issue, but I am not sure if an home-manager's activation script is the right place to declare that variable.

If anything, I would suggest checking that DBUS_SESSION_BUS_ADDRESS is already set before (re)exporting it.

Maybe your session manager, or shell's profile config, could be a better place for exporting the variable?

jh-devv commented 5 months ago

Maybe your session manager, or shell's profile config, could be a better place for exporting the variable?

Maybe, though, it is set?

Maybe something weird with Hyprland?

gmodena commented 5 months ago

Maybe, though, it is set? Maybe something weird with Hyprland?

mmm... could be? Unfortunately I am not familiar with hyperland. If you echo DBUS_SESSION_BUS_ADDRESS on a fresh install, is the variable set at all ?

If I understand your bug report correctly, unix:path=/run/user/$UID/bus existed in your system after boot, and you did not manually have the create the session. Is this right?

jh-devv commented 5 months ago

Starting Hyprland via an systemd service seemed to fix this?

gmodena commented 2 months ago

Closing this MR, since it seems more appropriate to configure (global) dbus state outside of an activation script. If other folks reports similar issues, we can add documentation / pointers to the project.