#!/usr/bin/env bash set -eo pipefail # Update system and install base packages sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install -y make build-essential git htop tmux jq ncdu pigz pv zip unzip curl wget gpg llvm sudo apt-get install -y vim tree gufw shellcheck tldr copyq bleachbit aptitude synaptic fastfetch gnome-tweaks gnome-shell-extensions dconf-editor # GNOME extensions gnome-extensions enable dash-to-dock@micxgx.gmail.com gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com gnome-extensions enable ding@rastersoft.com gnome-extensions enable another-window-session-manager@gmail.com # Add user to sudoers with NOPASSWD echo "$USER ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$USER sudo chmod 0440 /etc/sudoers.d/$USER sudo visudo -c # Update default editor to Vim sudo update-alternatives --set editor /usr/bin/vim.basic # Grub timeout duration sudo sed -i "s/GRUB_TIMEOUT=[0-9]*/GRUB_TIMEOUT=2/" "/etc/default/grub" && sudo update-grub # Zsh & Fonts sudo apt-get install -y zsh fonts-powerline sudo chsh -s "$(which zsh)" "$USER" # Ohmyzsh https://ohmyz.sh/ RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Ohmyzsh Plugins git clone --depth=1 https://github.com/marlonrichert/zsh-autocomplete.git "${HOME}/.oh-my-zsh/custom/plugins/zsh-autocomplete" git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git "${HOME}/.oh-my-zsh/custom/plugins/zsh-autosuggestions" git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git "${HOME}/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" # Configure .zshrc ZSHRC_FILE="$HOME/.zshrc" OLD_PLUGINS="plugins=(git)" NEW_PLUGINS="plugins=(git sudo copyfile command-not-found docker python zsh-autocomplete zsh-autosuggestions zsh-syntax-highlighting)" sed -i "s/${OLD_PLUGINS}/${NEW_PLUGINS}/" "$ZSHRC_FILE" sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/' "$ZSHRC_FILE" sed -i "s/^# zstyle ':omz:update' mode auto/zstyle ':omz:update' mode auto/" "$ZSHRC_FILE" echo 'export PATH=$PATH:/usr/sbin' >> "$ZSHRC_FILE" # Flatpak sudo apt-get install -y flatpak gnome-software-plugin-flatpak sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo # Discord https://flathub.org/apps/com.discordapp.Discord flatpak install -y flathub com.discordapp.Discord # Librewolf https://librewolf.net/installation/debian/ sudo apt-get update && sudo apt-get install -y extrepo sudo extrepo enable librewolf sudo apt-get update && sudo apt-get install -y librewolf # Prepare secure keyrings directory sudo install -m 0755 -d /etc/apt/keyrings # Spotify https://www.spotify.com/us/download/linux/ curl -fsSL https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/spotify.gpg sudo chmod a+r /etc/apt/keyrings/spotify.gpg echo "deb [signed-by=/etc/apt/keyrings/spotify.gpg] https://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list sudo apt-get update && sudo apt-get install -y spotify-client # Docker https://docs.docker.com/engine/install/debian/ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo groupadd -f docker sudo usermod -aG docker "$USER"