Newer
Older
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Tails: The Amnesic Incognito Live System
#
# 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/>.
require_relative 'lib/tails_build_settings'
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
config.vm.box = box_name
config.vm.box_url = "http://dl.amnesia.boum.org/tails/project/vagrant/#{config.vm.box}.box"
config.vm.box_url = "http://127.0.0.1/dev/null"
ENV['EXPORTED_VARIABLES'] ||= ""
env_vars = ENV.select { |k,v| ENV['EXPORTED_VARIABLES'].split.include?(k) }
.map { |k, v| "#{k}='#{v}'" } .join(' ')
sudo #{env_vars} /vagrant/provision/setup-tails-builder
config.vm.synced_folder '.', '/vagrant', type: '9p', readonly: true
config.vm.synced_folder '..', '/amnesia.git', type: '9p', readonly: true
domain.default_prefix = config.vm.box
domain.management_network_guest_ipv6 = 'no'
domain.connect_via_ssh = false
domain.machine_arch = 'x86_64'

intrigeri
committed
if ENV['TAILS_BUILD_MACHINE_TYPE']
domain.machine_type = ENV['TAILS_BUILD_MACHINE_TYPE']
else
domain.machine_type = 'q35'
end

intrigeri
committed
if ENV['TAILS_BUILD_CPU_MODEL']
domain.cpu_mode = 'custom'
domain.cpu_model = ENV['TAILS_BUILD_CPU_MODEL']
else
domain.cpu_mode = 'host-passthrough'
end
domain.memory = ENV['TAILS_RAM_BUILD'] ? VM_MEMORY_FOR_RAM_BUILDS :
VM_MEMORY_FOR_DISK_BUILDS
if ENV['TAILS_PROXY_TYPE' ] == 'vmproxy'
domain.storage(
:file, size: '15G', allow_existing: true,
path: 'apt-cacher-ng-data.qcow2'
)
end

David Isaac Wolinsky
committed
end