Separate GUI config.

This commit is contained in:
Daniel Buckmaster 2015-02-07 17:03:04 +11:00
parent 7252c69738
commit 2416297b12
3 changed files with 19 additions and 7 deletions

View file

@ -1,6 +1,10 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
def gui?
!ENV.fetch('GUI', '').empty?
end
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = '2'
@ -8,13 +12,22 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.provider 'virtualbox' do |vb|
#vb.gui = true
vb.memory = 1024
if gui?
vb.memory = 2048
vb.customize ['modifyvm', :id, '--vram', '256']
vb.customize ['modifyvm', :id, '--accelerate3d', 'on']
vb.customize ['modifyvm', :id, '--hwvirtex', 'on']
vb.gui = true
end
end
config.vm.synced_folder '../../', '/torque'
config.vm.provision :shell, path: 'provision.sh'
if gui?
config.vm.provision :shell, path: 'provision-gui.sh'
end
# config.vm.network 'forwarded_port', guest: 80, host: 8080

View file

@ -0,0 +1,5 @@
# Install Unity desktop for GUI purposes.
apt-get install --no-install-recommends \
ubuntu-desktop \
gnome-terminal \
-y

View file

@ -1,12 +1,6 @@
# Make sure package listings are up to date.
apt-get update -y
# Install Unity desktop for GUI purposes.
#apt-get install --no-install-recommends \
# ubuntu-desktop \
# gnome-terminal \
# -y
# Install software for development.
sudo apt-get install \
git \