From 5237deba154709ffe07fd18229c97d3b8be97b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin-Charles=20Guih=C3=A9neuf?= Date: Sat, 12 Sep 2020 23:47:28 +0200 Subject: [PATCH] auto-config: Migration from Nextcloud --- auto-config-cli.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++ auto-config.sh | 21 +++++++++++++ 2 files changed, 96 insertions(+) create mode 100755 auto-config-cli.sh create mode 100755 auto-config.sh diff --git a/auto-config-cli.sh b/auto-config-cli.sh new file mode 100755 index 0000000..e6ac8b9 --- /dev/null +++ b/auto-config-cli.sh @@ -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 diff --git a/auto-config.sh b/auto-config.sh new file mode 100755 index 0000000..1be3079 --- /dev/null +++ b/auto-config.sh @@ -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