8a0da1ad |
1 | # -*- mode: ruby -*- |
2 | # vi: set ft=ruby : |
3 | |
4 | Vagrant.configure("2") do |config| |
5 | |
1c546636 |
6 | config.vm.box = "ubuntu/artful64" |
8a0da1ad |
7 | |
f60546e0 |
8 | # use vagrant-disksize plugin to resize partition - https://github.com/sprotheroe/vagrant-disksize |
9 | config.disksize.size = '50GB' |
10 | |
8a0da1ad |
11 | config.vm.provider "virtualbox" do |vb| |
12 | # Customize the amount of memory on the VM |
13 | vb.memory = "2048" |
14 | end |
15 | |
1c546636 |
16 | # Share the root of the repo |
8a0da1ad |
17 | config.vm.synced_folder "../", "/termux-packages" |
1c546636 |
18 | # Disable the default /vagrant share directory, as it shares the directory with the Vagrantfile in it, not the repo root |
8a0da1ad |
19 | config.vm.synced_folder ".", "/vagrant", disabled: true |
20 | |
f60546e0 |
21 | # filesystem needs to be resized |
22 | config.vm.provision "shell", inline: "sudo resize2fs /dev/sda1" |
23 | |
24 | # helpful before setup-ubuntu.sh is run |
25 | config.vm.provision "shell", inline: "sudo apt-get update" |
8a0da1ad |
26 | |
1c546636 |
27 | # Run provisioning scripts |
8a0da1ad |
28 | config.vm.provision "shell", path: "./setup-ubuntu.sh", privileged: false |
29 | config.vm.provision "shell", path: "./setup-android-sdk.sh", privileged: false |
30 | |
f60546e0 |
31 | # Fix permissions on the /data directory in order to allow the "vagrant" user to write to it |
8a0da1ad |
32 | config.vm.provision "shell", |
f60546e0 |
33 | inline: "sudo chown -R vagrant /data" |
8a0da1ad |
34 | |
1c546636 |
35 | # Tell the user how to use the VM |
8a0da1ad |
36 | config.vm.post_up_message = "Box has been provisioned! Use 'vagrant ssh' to enter the box. The repository root is available under '/termux-packages'." |
37 | end |