Last active
May 27, 2019 20:27
-
-
Save pyaillet/f5492750c64dbf5445f58cf4dd2e8d88 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
#!/usr/bin/env sh | |
# Install | |
apt update | |
apt install -y python3 python3-pip neovim docker.io golang | |
USER="pyaillet" | |
USER_HOME="/home/$USER" | |
groupadd $USER | |
useradd -d $USER_HOME -m -g $USER -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lxd,ubuntu,google-sudoers $USER | |
# Setup neovim | |
curl -fLo $USER_HOME/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
chown -R $USER:$USER $USER_HOME/.local | |
curl -o $USER_HOME/.config/nvim/init.vim --create-dirs https://raw.githubusercontent.com/charlyx/vim-config/master/init.vim | |
chown -R $USER:$USER $USER_HOME/.config | |
sed -i -e 's/colorscheme/" colorscheme/' $USER_HOME/.config/nvim/init.vim | |
sudo -u pyaillet -H nvim +PlugInstall +qall | |
sed -i -e 's/" colorscheme/colorscheme/' $USER_HOME/.config/nvim/init.vim | |
# Setup golang | |
mkdir -p $USER_HOME/go | |
chown -R $USER:$USER $USER_HOME/go | |
cat <<EOF >> $USER_HOME/.bashrc | |
export GOPATH="$USER_HOME/go" | |
export PATH="\$PATH:\$GOPATH/bin" | |
alias nv=nvim | |
EOF | |
usermod -a -G docker $USER | |
wall "*** Init done ! ***" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment