Last active
July 7, 2022 20:21
-
-
Save rms1000watt/e6770409f9980000ffa6c1d58ee9cd90 to your computer and use it in GitHub Desktop.
freebsd usage in vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Setup zsh | |
sudo pkg update | |
sudo pkg install zsh git vim go | |
sudo chsh -s zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name = ENV['NAME'] || File.basename(Dir.getwd) | |
Vagrant.configure("2") do |config| | |
config.vm.define "#{$name}" | |
config.vm.hostname = "#{$name}" | |
config.vm.box = "bento/freebsd-13" | |
config.disksize.size = "64GB" | |
config.vm.provider :virtualbox do |v| | |
v.name = "#{$name}" | |
v.cpus = 2 | |
v.memory = 4096 | |
end | |
config.vm.provision :file, :source => "#{ENV['HOME']}/.ssh/id_rsa_#{$name}", destination: "/home/vagrant/.ssh/id_rsa_#{$name}" | |
config.vm.provision :file, :source => "#{ENV['HOME']}/.ssh/id_rsa_#{$name}.pub", destination: "/home/vagrant/.ssh/id_rsa_#{$name}.pub" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment