Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vagrantfile for Arch Linux. It's ok with vagrant 1.3.4.
# My helpers
#
def fwd_ports(config, ports)
ports = [ports] unless ports.respond_to?(:each)
ports.each do |port|
config.vm.network :forwarded_port, guest: port, host: port
end
end
def share_folder(config, source, destiny)
if File.directory? File.expand_path(source)
config.vm.synced_folder source, destiny
end
end
# Vagrant DSL
#
Vagrant.configure("2") do |config|
config.vm.box = "arch64"
config.vm.box_url = "https://googledrive.com/host/0B_BLFE4aPn5zUVpyaHdLanVnMTg/vagrant-archlinux-2013-8.box"
config.vm.hostname = "development"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "90"]
end
fwd_ports config, 3000..3010
fwd_ports config, 3020..3021
fwd_ports config, 9000..9010
share_folder config, "~/Dropbox", "/home/vagrant/Dropbox"
share_folder config, "~/Work", "/home/vagrant/Work"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.