Skip to content

Instantly share code, notes, and snippets.

@kencoba
Created August 12, 2020 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kencoba/b7ddf6c0d6dfc5c9d31b363c109ae88a to your computer and use it in GitHub Desktop.
Save kencoba/b7ddf6c0d6dfc5c9d31b363c109ae88a to your computer and use it in GitHub Desktop.
Vagrantfile for Haskell.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
# To solve the issue of "vagrant@127.0.0.1: permission denied (publickey)."
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config; \
sudo systemctl restart sshd;
apt-get update
apt-get upgrade
curl -sSL https://get.haskellstack.org/ | sh
sudo cat << EOF >> /etc/profile
# set PATH for stack command(haskell-stack).
PATH="$HOME/.local/bin:$PATH"
# set stack ghc aliases
alias ghci='stack ghci'
alias ghc='stack ghc --'
alias runghc='stack runghc --'
EOF
stack setup
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment