Yes. Though I highly recommend making liberal use of whitespaces, line breaks and include statements to increase readability - ultimately its up to you to skip line breaks where convenient - nginx only treats line breaks special to be able to point out the line where configuration parser errors occurred.
nginx configuration files are nothing more than ...
If you want to add a variable to for all users of your system, you add it in the /etc/environment. It is global environment file.
You want to define variable for your current script only, you can use the path as a regular variable before the place where you have used the variable or you want to add the path as a variable, you can use export also.