In QGis 2.x, I could rotate a point symbol towards the nearest geometry of a certain kind by using:
This however does not work in QGIS 3.x, and I cannot find out what rotation command to use.
geomnearest is a function of the refFunctions plugin, search it in the QGIS extension menu and install it, it's available in QGIS 3.x.
see Plugin page :
Retrieve target field value from the nearest target feature in target layer