work/build/user.sh

52 lines
1.2 KiB
Bash

#!/bin/bash
set -x
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
U="$USERNAME_TO_ADD"
export LC_ALL=en_US
export LANG=en_US.UTF-8
# original home
OH="/hosthome"
# link ~/.home to original home
ln -s "/hosthome" $HOME/.home
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
bash /tmp/installomz.sh --unattended --keep-zshrc
# vim-plug
# this should happen from vimrc
#curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# link in ssh key from original home
mkdir -p ~/.ssh
ln -s ~/.home/Documents/sync/secrets/ssh/pixel16/id_rsa ~/.ssh/id_rsa
ln -s ~/.home/Documents/sync/secrets/ssh/pixel16/id_rsa.pub ~/.ssh/id_rsa.pub
# install pyenv
git clone -n https://github.com/pyenv/pyenv.git ~/.pyenv
pushd ~/.pyenv
git checkout 3e0f5e798ca16cd9389c4c8805038ac2c0d45cae
popd
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.8.2
git clone -n https://github.com/nvm-sh/nvm.git ~/.nvm
pushd ~/.nvm
git checkout 73438e339e242fce0cba443e5c4322ac996e9197
popd
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm install node