# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.box = "jhcook/osx-elcapitan-10.11"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.2.100"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # Use NFS for the shared folder
  # Source: https://github.com/AndrewDryga/vagrant-box-osx

  # config.vm.synced_folder ".", "/vagrant", :nfs => true, :mount_options => ['nfsvers=4']
  # config.vm.synced_folder "/home/markus/projects/ansible/freckles", "/freckles", id: "freckles"
  #config.vm.synced_folder ".", "/vagrant", type: "nfs"

  config.vm.synced_folder ".", "/vagrant", id: "vagrant", type: "rsync", owner: "vagrant", group: "admin"
  config.vm.synced_folder "../../", "/inaugurate", id: "inaugurate", type: "rsync", owner: "vagrant", group: "admin", rsync__exclude: [".git", "vagrant", ".tox", ".vagrant"]
  config.vm.synced_folder "../../../freckles", "/freckles", id: "freckles", type: "rsync", owner: "vagrant", group: "admin", rsync__exclude: [".git", "vagrant", ".tox", ".vagrant"]
  config.vm.synced_folder "../../../frkl", "/frkl", id: "frkl", type: "rsync", owner: "vagrant", group: "admin", rsync__exclude: [".git", ".tox", "vagrant", ".vagrant"]
  config.vm.synced_folder "../../../nsbl", "/nsbl", id: "nsbl", type: "rsync", owner: "vagrant", group: "admin", rsync__exclude: [".git", ".tox", "vagrant", ".vagrant"]
  config.vm.synced_folder "~/.pip", "/pip", id: "pip", type: "rsync", owner: "vagrant", group: "admin"

    # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # See https://www.virtualbox.org/manual/ch08.html for possible options.
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = false
    # Customize the amount of memory on the VM:
    vb.memory = "4096"
    # Enable 3D Display Acceleration
    vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
    # Enable bidirectional clipboard
    vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
  end
  #config.vm.provision :shell, path: "vagrant_bootstrap.sh", privileged: false
end
