Last active 4 months ago

Install essentials, oh-my-zsh and vimconf

Revision a649b7e2900e897a98cee99cdab61acaf725758f

README.md Raw

Ubuntu Development Environment Setup Script

This bash script automatically configures a comprehensive development environment on Ubuntu/Debian systems. Here's what it accomplishes:

Installation

Curl

curl -fsSL https://opengist.internal.willithiel.net/wthiel/032ceca594884fce86ed8a6a32726bd2/raw/HEAD/bootstrap.sh | bash

wget

wget -qO- https://opengist.internal.willithiel.net/wthiel/032ceca594884fce86ed8a6a32726bd2/raw/HEAD/bootstrap.sh | bash

System Updates & Essential Tools

  • Updates package repositories
  • Installs core development tools: build-essential, git, zsh, htop, tmux

Advanced Shell Configuration

Component Purpose Configuration
Oh My Zsh Enhanced Zsh framework Installs from official repository
Powerlevel10k Advanced shell theme Custom prompt with host, directory, git status, virtualenv
Syntax Highlighting Command syntax coloring System package installation
Auto-suggestions Command completion Plugin integration

Vim Editor Enhancement

  • Installs Vim with exuberant-ctags support
  • Deploys timss/vimconf configuration for enhanced editing experience
  • Creates symbolic links for configuration files

Security & Access Configuration

  • Passwordless Sudo: Grants the current user unrestricted sudo access without password prompts
  • SSH Key Installation: Adds a predefined Ed25519 public key to authorized_keys for remote access
  • Sets appropriate file permissions (700 for .ssh, 600 for authorized_keys)

Key Features

  • Automated Setup: Complete hands-off installation
  • Developer-Focused: Tools optimized for coding and system administration
  • Security Integration: SSH key deployment for remote access
  • Shell Customization: Modern, feature-rich terminal experience
bootstrap.sh Raw
1#!/bin/bash
2
3# Update packages, install essentials
4sudo apt update
5sudo apt install -y build-essential git zsh htop tmux
6
7# Install: oh-my-zsh
8sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
9
10# Install Powerlevel10k
11git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
12sed -i -- 's/ZSH_THEME="robbyrussell"/plugins=(virtualenv)\nPOWERLEVEL9K_CUSTOM_LIVE_BACKGROUND="red"\nPOWERLEVEL9K_CUSTOM_LIVE_FOREGROUND="white"\nPOWERLEVEL9K_MODE="nerdfont-complete"\nPOWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_live host dir vcs virtualenv)\nPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load ram disk_usage time)\nZSH_THEME="powerlevel10k\/powerlevel10k"\n/g' ~/.zshrc
13
14# zsh-syntax-highlighting
15sudo apt install zsh-syntax-highlighting
16echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
17
18# zsh-autosuggestions
19git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
20sed -i -- 's/^plugins=(/plugins=(\n zsh-autosuggestions\n/g' ~/.zshrc
21
22# Install: timss/vimconf (https://github.com/timss/vimconf#installation)
23sudo apt install -y vim exuberant-ctags
24mkdir -p ~/.vim/vimconf
25git clone https://github.com/timss/vimconf.git ~/.vim/vimconf
26ln -s ~/.vim/vimconf/.vimrc ~/.vimrc
27
28# Add user to sudoers with no password
29echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
30sudo chmod 440 /etc/sudoers.d/$USER
31
32# Install public key
33KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILB5bVuBHYwgtCL+ppoOkKSpu/+wmSOt80yVE/S2qU0F"
34mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo "$KEY" >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
35