4 # Tails: The Amnesic Incognito Live System
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Monkey-patched Vagrant!
20 $:.unshift File.expand_path('../lib', __FILE__)
21 require 'vagrant_version'
22 require 'vagrant_verified_download'
23 require 'tails_build_settings'
25 if ENV['TAILS_RAM_BUILD']
26 mem_size = VM_MEMORY_FOR_RAM_BUILDS
28 mem_size = VM_MEMORY_FOR_DISK_BUILDS
31 cpus = ENV['TAILS_BUILD_CPUS']
34 Vagrant::Config.run do |config|
35 config.vm.box = 'tails-builder-20140709'
36 config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/tails-builder-20140709.box'
38 config.vm.provision :shell, :inline => "http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"
40 config.vm.share_folder 'amnesia', '/amnesia.git', '../.git'
42 config.vm.customize ['modifyvm', :id, '--memory', mem_size]
43 config.vm.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?
46 Vagrant.configure("2") do |config|
47 config.vm.box = 'tails-builder-20140709'
48 config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/tails-builder-20140709.box'
50 config.vm.provision "shell",
51 inline: "sudo http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"
53 config.vm.synced_folder '../.git', '/amnesia.git'
55 config.vm.provider :virtualbox do |vb|
56 vb.customize ['modifyvm', :id, '--memory', mem_size]
57 vb.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?