-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
50 lines (39 loc) · 1.51 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
settings = YAML.load_file('Vagrantsettings.yaml')
$root = File.dirname(__FILE__)
Vagrant.configure(2) do |config|
config.vm.box = settings["vm"]["box"]
if Vagrant.has_plugin?("vagrant-timezone")
config.timezone.value = settings["vm"]["timezone"]
end
# mounts
config.vm.synced_folder "./dotfiles", "/home/vagrant/dotfiles"
config.vm.provider "virtualbox" do |vb|
vb.gui = settings["vm"]["gui"]
vb.cpus = settings["vm"]["cpus"]
vb.memory = settings["vm"]["memory"]
vb.customize [
'modifyvm', :id,
'--natdnshostresolver1', 'on',
'--nic1', 'nat',
'--cableconnected1', 'on'
]
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-interval", 10000 ]
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust", 100 ]
end
# Copy the custom shutdown wrapper so that we can halt with the CLI
config.vm.provision "shell", run: "always", inline: <<-SHELL
cp /vagrant/bin/shutdown /bin/shutdown
SHELL
config.vm.provision "shell", run: "always", inline: <<-SHELL
setup-apkcache /var/cache/apk
apk add --upgrade apk-tools
apk cache -v sync
apk upgrade -v
SHELL
config.vm.provision "shell", path: "scripts/custom.sh"
config.vm.provision "shell", path: "scripts/dotfiles.sh", privileged: false
end