auto-config: Migration from Nextcloud

This commit is contained in:
Robin-Charles Guihéneuf 2020-09-12 23:47:28 +02:00
parent f79f1f19dd
commit d99ec6bcb6
2 changed files with 96 additions and 0 deletions

75
auto-config-cli.sh Executable file
View File

@ -0,0 +1,75 @@
#!/bin/bash
if [ $(id -u) -eq 0 ]
then echo "Root access not needed"; exit
fi
install_git_repo () {
if [ ! -d "$2" ]
then
echo "Cloning $1 in $2"
git clone $1 $2 --depth=1
else
echo "Pulling $1 in $2"
cd $2
git pull
fi
}
# Install packages
sudo apt update
sudo apt upgrade
sudo apt install minicom ssh git tig ack tree npm cargo python3-pip curl zsh
# Install Oh my ZSH
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Update Oh my ZSH
omz update
# Install Oh my ZSH plugins
install_git_repo https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
install_git_repo https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
install_git_repo https://github.com/zsh-users/zsh-history-substring-search.git $HOME/.oh-my-zsh/custom/plugins/zsh-history-substring-search
# Aliases
ln -sfn $HOME/.dotfiles/.bash_aliases $HOME/.bash_aliases
# ZSHRC
ln -sfn $HOME/.dotfiles/.zshrc $HOME/.zshrc
# ZSH Themes
ln -sfn $HOME/.dotfiles/vulporuza.zsh-theme $HOME/.oh-my-zsh/custom/themes/vulporuza.zsh-theme
# ZSH GIT Prompt
install_git_repo https://github.com/zsh-git-prompt/zsh-git-prompt.git $HOME/.zsh-git-prompt
# GIT Prompt
install_git_repo https://github.com/magicmonty/bash-git-prompt.git $HOME/.bash-git-prompt
# GIT Autofixup
install_git_repo https://github.com/torbiak/git-autofixup.git $HOME/.git-autofixup
# GIT fzf
install_git_repo https://github.com/junegunn/fzf.git $HOME/.fzf
# Install fzf
$HOME/.fzf/install
# Install navi
cargo install navi
mkdir -p $HOME/.local/share/navi/cheats
ln -sfn $HOME/.dotfiles/navi/ $HOME/.local/share/navi/cheats/vulporuza
# Update pip
pip3 install --upgrade pip
# Install undervolt
sudo pip3 install undervolt
# Update npm
sudo npm install -g npm
# Install rebase-editor
sudo npm install -g rebase-editor
git config --global sequence.editor rebase-editor

21
auto-config.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
if [ $(id -u) -eq 0 ]
then echo "Root access not needed"; exit
fi
# CLI Tools
$HOME/.dotfiles/auto-config-cli.sh
# Codium
if [ ! -f "/etc/apt/sources.list.d/vscodium.list" ]
then
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
fi
sudo apt install codium
mkdir -p $HOME/.config/VSCodium/User/
ln -sf $HOME/.dotfiles/codium/keybindings.json $HOME/.config/VSCodium/User/keybindings.json
ln -sf $HOME/.dotfiles/codium/settings.json $HOME/.config/VSCodium/User/settings.json