Add selfinstall command.
Use a NIXD_DIR environment variable.
Add selfinstall to README.
Expose config variables to user environment.
Add missing function export.