-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
64 lines (61 loc) · 1.83 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
config.vm.provider :libvirt do |libvirt|
libvirt.memory = 4096
end
config.vm.synced_folder ".",
"/vagrant",
type: "9p",
accessmode: "mapped",
mount_options: ['rw', 'trans=virtio', 'version=9p2000.L']
config.vm.provision "file", source: "~/.ssh/id_rsa", destination: "/home/vagrant/.ssh/id_rsa"
config.vm.provision "shell", inline: "apt-get update -y"
config.vm.provision "shell", inline: "apt-get install -y build-essential"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
curl -L -O https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
chmod +x rustup-init
./rustup-init --default-toolchain stable --no-modify-path -y
echo "source ~/.cargo/env" >> ~/.bashrc
SHELL
config.vm.provision "shell", inline: <<-SHELL
curl -L -O https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
chmod +x rustup-init
./rustup-init --default-toolchain stable --no-modify-path -y
echo "source ~/.cargo/env" >> ~/.bashrc
# Copy the binaries to a system-wide location for running tests as the root user
sudo cp ~/.cargo/bin/** /usr/local/bin
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
mkdir -p ~/.vim/tmp/ ~/.vim/backup
cat <<'EOF' > ~/.vimrc
set nocompatible
let mapleader=" "
syntax on
set background=dark
set backspace=indent,eol,start
set backupdir=~/.vim/tmp//
set directory=~/.vim/backup
set expandtab
set foldlevel=1
set foldmethod=indent
set foldnestmax=10
set hlsearch
set ignorecase
set incsearch
set laststatus=2
set nobackup
set nofoldenable
set nowrap
set number relativenumber
set ruler
set shiftwidth=4
set smartindent
set showcmd
set shortmess+=A
set tabstop=4
set viminfo+=!
nnoremap j gj
nnoremap k gk
EOF
SHELL
end