[Beginner] Can VIN (7V) and 5V pin safely share GND? (Nano)

Hello dear forum,
I would like to know if I can have two different voltages connect to the same ground in the following way. I made a sketch to make it easier for you:

It is a linear sliding potentiometer, an arduino nano (clone) and a 7v power supply.

Thank you for an answer, and have a nice day.

Yes.
The Nano has only one (common) ground. Your diagram seems fine.
Leo..

Thank you for your quick and helpful response.