If you wire 3.5mm jack using the GPIO pinout on Nano Pi, you might not get any sound. Apparently, analog audio output is disabled in DietPi. To enable it, edit the following line in /boot/armbianEnv.txt:

overlays=analog-codec usbhost1 usbhost2

Armbian doesn’t have this issue. This method works, because DietPi is based on Armbian.