arnaucube
arnaucube/hyperplonkPublic Self-hosted repository
hyperplonk/nix/vagrant/Vagrantfile
nix/vagrant/VagrantfileRaw
 1# -*- mode: ruby -*-
 2# vi: set ft=ruby :
 3
 4Vagrant.configure("2") do |config|
 5
 6  config.vm.define "ubuntu" do |ubuntu|
 7    ubuntu.vm.box = "generic/ubuntu2004"
 8    $script = <<~SCRIPT
 9      set -euxo pipefail
10      curl -L https://nixos.org/nix/install | sh
11    SCRIPT
12    ubuntu.vm.provision "shell", inline: $script, privileged: false
13  end
14
15  config.vm.define "ubuntu_rustup" do |ubuntu|
16    ubuntu.vm.box = "generic/ubuntu2004"
17    $script = <<~SCRIPT
18      set -euxo pipefail
19      curl -L https://nixos.org/nix/install | sh
20      curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
21      source $HOME/.cargo/env
22      rustup default stable-2021-06-17
23    SCRIPT
24    ubuntu.vm.provision "shell", inline: $script, privileged: false
25  end
26
27  config.ssh.forward_agent = true
28  config.vm.synced_folder  ".", "/vagrant", disabled: false
29  config.vm.synced_folder  "../..", "/hyperplonk", disabled: false, rsync__exclude: [".git/", "target"]
30
31
32  config.vm.provider "libvirt" do |v|
33    v.cpus = 4
34  end
35
36end