Move shell scripts to VagrantFile to be automated

Automated shell scripts that user has to type in manually after sshing into VM box. The shell scripts now run after the box is setup and provisioned. The shell scripts right now consist of setting the default terminal to XTERM, updating apt-get package listing, and installing nodejs.
I wonder if ruby, rvm, and the other programs could be installed like this, on a base box.