Created
October 13, 2016 02:05
-
-
Save erikh/d275b6227db04ccb66257ff8b3888c89 to your computer and use it in GitHub Desktop.
This file contains 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
from "ubuntu" | |
myuser = "erikh" | |
homedir = "/home/#{myuser}" | |
packages = %w[ | |
ack-grep | |
zsh | |
tmux | |
build-essential | |
vim-nox | |
git | |
mercurial | |
ruby-full | |
curl | |
flex | |
bison | |
sudo | |
keychain | |
] | |
run "apt-get update" | |
run "apt-get dist-upgrade -y" | |
run "apt-get install -y #{packages.join(" ")}" | |
run "curl -sSL https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz | tar -xvz -C /usr/local" | |
run "curl -sSL https://get.docker.com | bash" | |
run %Q[echo "#{myuser} ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers] | |
# staff is what the docker sock will come in as when bind mounted | |
run "useradd #{myuser} -G docker,sudo,staff -s /bin/zsh -m -d #{homedir}" | |
user myuser | |
workdir homedir | |
copy ".", "config" | |
env "TERM" => "xterm-256color", | |
"GOPATH" => "/home/#{myuser}", | |
"PATH" => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" | |
with_user "root" do | |
run "chown -R #{myuser}:#{myuser} config" | |
end | |
inside "#{homedir}/config" do | |
run "sh setup.sh" | |
end | |
run "vim -c 'set nomore' +PluginUpdate +qall" | |
run "vim -c 'set nomore' +GoInstallBinaries +qall" | |
cmd "/bin/zsh -l" | |
tag "dev" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment