Skip to content

Commit

Permalink
Add vagrantfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSolanaceae committed Nov 4, 2024
1 parent 0a0585d commit 215b7cd
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# will have compiled files and executables
debug/
target/
.vagrant/

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
28 changes: 28 additions & 0 deletions vagrant/linux/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
hostname = "lin.rustbox"
locale = "en_GB.UTF.8"

config.vm.box = "ubuntu/trusty64"

config.vm.provider "virtualbox" do |v|
v.graphics_type = "vnc"
v.graphics_autoport = true
v.memory = 4096
v.cpus = 2
end

config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y git curl build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cd /home/vagrant
git clone https://github.com/0xSolanaceae/discord-imhex.git
SHELL
end
54 changes: 54 additions & 0 deletions vagrant/windows/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'

Vagrant.configure("2") do |config|

hostname = "win.rustbox"
locale = "en_GB.UTF.8"

config.vm.box = "peru/windows-10-enterprise-x64-eval"

config.vm.provider "libvirt" do |v|
v.graphics_type = "vnc"
v.graphics_autoport = true
v.memory = 4096
v.cpus = 2
end

config.vm.provision "shell", inline: <<-SHELL
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# upgrade choco
choco upgrade chocolatey -y
choco config set commandExecutionTimeoutSeconds 2700
# dev tools
$ErrorActionPreference = 'Stop'
$maxRetries = 3
$retryCount = 0
while ($retryCount -lt $maxRetries) {
try {
choco install git -y
choco install rust -y
choco install thorium -y # use this to install discord-ptb
choco install imhex -y
break
} catch {
Write-Host "Installation failed, retrying..."
$retryCount++
Start-Sleep -Seconds 10
}
}
# clone repo
cd C:\\Users\\vagrant\\Desktop
try {
git clone https://github.com/0xSolanaceae/discord-imhex.git
} catch {
Write-Host "clone failed, continuing..."
}
SHELL
end

0 comments on commit 215b7cd

Please sign in to comment.