I wrote a comprehensive guide on path substitution you can find here…
If your using SMB you may have to either manually edit ~/.kodi/userdata/passwords.xml to add/update credentials or else just add a new video source location (Videos>files>add videos>browse>add network location>) which will add credentials as part of that process.
I can’t help you out with the NFS stuff as I’ve no personal experience with that.