initial commit

This commit is contained in:
Franz Heinzmann (Frando) 2020-07-14 23:33:07 +02:00
commit bcd52055e7
7 changed files with 117 additions and 0 deletions

42
init-neovim.sh Normal file
View file

@ -0,0 +1,42 @@
# setup neovim
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
mkdir -p $HOME/.config/nvim
cat <<EOF >$HOME/.config/nvim/init.vim
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'scrooloose/nerdtree', { }
Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-fugitive'
Plug 'sheerun/vim-polyglot'
Plug 'mxw/vim-jsx'
Plug 'scrooloose/nerdcommenter'
Plug 'NLKNguyen/papercolor-theme'
call plug#end()
set background=dark
!silent colorscheme PaperColor
filetype plugin indent on
set mouse=a
set autoindent
set number
set backspace=2 " Allow backspacing over autoindent, EOL, etc.
set showmatch " Match parentheses
set matchpairs+=<:> " Match parentheses for angle bracket pairs
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set shiftround " Rounds indent to multiple of shiftwidth
set foldlevelstart=99
set hidden
map <F9> :NERDTreeToggle<CR>
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
EOF
nvim +'PlugInstall --sync' +qa

14
init-tmux.sh Normal file
View file

@ -0,0 +1,14 @@
# setup tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cat <<EOF >$HOME/.tmux.conf
set-option -g mouse on
setw -g alternate-screen on
set -ga terminal-overrides ",*256col*:Tc"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
run -b '~/.tmux/plugins/tpm/tpm'
EOF

11
init-zsh.sh Normal file
View file

@ -0,0 +1,11 @@
# setup slimzsh
git clone --recursive https://github.com/changs/slimzsh.git ~/.slimzsh
cat <<EOF > $HOME/.zshrc
source "$HOME/.slimzsh/slim.zsh"
alias vi=nvim
alias ls='ls --color=auto'
EOF
chsh -s /bin/zsh $USER

18
install-basics.sh Normal file
View file

@ -0,0 +1,18 @@
# install basics
apt update -y
apt install sudo neovim zsh git tmux -y
# install node
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt update -y
apt install nodejs -y
node --version
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
# install pm2
yarn global add pm2 --prefix /usr/local

9
install-nginx.sh Normal file
View file

@ -0,0 +1,9 @@
# setup nginx
apt install nginx -y
# setup certbot
add-apt-repository ppa:certbot/certbot -y
apt update -y
apt install python-certbot-nginx -y
crontab -l | { cat; echo "0 12 * * * /usr/bin/certbot renew --quiet"; } | crontab -
echo "done!"

13
setup-root.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# install basics
. install-basics.sh
# setup slimzsh
. init-zsh.sh
# setup tmux
. init-tmux.sh
# setup neovim
. init-neovim.sh

10
setup-user.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
# setup zsh
. init-zsh.sh
# setup tmux
. init-tmux.sh
# setup neovim
. init-neovim.sh