summaryrefslogtreecommitdiffstats
path: root/vagrant/Vagrantfile
blob: 3fea8185793f3bb2d9348e7381e2a40beb919e22 (plain)
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Tails: The Amnesic Incognito Live System
# Copyright © 2012 Tails developers <tails@boum.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Monkey-patched Vagrant!
$:.unshift File.expand_path('../lib', __FILE__)
require 'vagrant_verified_download'
require 'tails_build_settings'

if ENV['TAILS_RAM_BUILD']
  mem_size = VM_MEMORY_FOR_RAM_BUILDS
else
  mem_size = VM_MEMORY_FOR_DISK_BUILDS
end

cpus = ENV['TAILS_BUILD_CPUS']

Vagrant::Config.run do |config|
  config.vm.box = 'tails'

  config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/squeeze.box'
  config.vm.box_checksum = 'ffb3f68f55a3458e007b9abed3eac057f71c518713fcdf982b78f8b59e28318e'

  config.vm.provision :shell, :inline => "http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"

  config.vm.share_folder 'amnesia', '/amnesia.git', '../.git'

  config.vm.customize ['modifyvm', :id, '--memory', mem_size]
  config.vm.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?
end