Skip to content

Instantly share code, notes, and snippets.

@erikh
Created October 13, 2016 16:35
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 erikh/56cc16755a00df8af02314dc2f8f1d74 to your computer and use it in GitHub Desktop.
Save erikh/56cc16755a00df8af02314dc2f8f1d74 to your computer and use it in GitHub Desktop.
from "ubuntu"
myuser = "erikh"
homedir = "/home/#{myuser}"
packages = %w[
man
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