[systemd-devel] "systemd-path systemd-search-user-unit" does not match reality

Vladimir Panteleev git at vladimir.panteleev.md
Thu Jul 25 07:42:13 UTC 2024


Hi,

Context: I'm trying to use home-manager, which extends the systemd
user unit search path. However, though I can see the added path in
"systemd-path systemd-search-user-unit", systemd still cannot find
units there:

-----
$ systemctl --user daemon-reload

$ systemd-path systemd-search-user-unit | tr : '\n'
/home/vladimir/.config/systemd/user.control
/run/user/1000/systemd/user.control
/run/user/1000/systemd/transient
/run/user/1000/systemd/generator.early
/home/vladimir/.config/systemd/user
/etc/xdg/systemd/user
/etc/systemd/user
/run/user/1000/systemd/user
/run/systemd/user
/run/user/1000/systemd/generator
/home/vladimir/.local/share/systemd/user
/usr/local/share/systemd/user
/usr/share/systemd/user
/home/vladimir/.nix-profile/share/systemd/user
/nix/var/nix/profiles/default/share/systemd/user
/usr/local/lib/systemd/user
/usr/lib/systemd/user
/run/user/1000/systemd/generator.late

$ cat /home/vladimir/.nix-profile/share/systemd/user/xdg-desktop-portal-gtk.service
[Unit]
Description=Portal service (GTK/GNOME implementation)

[Service]
Type=dbus
BusName=org.freedesktop.impl.portal.desktop.gtk
ExecStart=/nix/store/d84a85gghx9mr53wj78wy7rw5dmwf4i0-xdg-desktop-portal-gtk-1.15.1/libexec/xdg-desktop-portal-gtk

$ systemctl --user cat xdg-desktop-portal-gtk.service
No files found for xdg-desktop-portal-gtk.service.
-----

It looks like "systemd-path systemd-search-user-unit" isn't accurate
or does not correspond to the list of paths that systemd is looking
in.

What's missing to make systemd be able to find units in the
"systemd-search-user-unit" list?
I'm using systemd 256 (256.2-1-arch) on Arch Linux.

Thanks!


More information about the systemd-devel mailing list