Остання активність 4 months ago

Install essentials, oh-my-zsh and vimconf

README.md Неформатований

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 Неформатований
1#!/bin/bash
2
3# Update packages, install essentials
4sudo apt update
5sudo apt install -y build-essential git zsh htop tmux
6
7# Enable mouse scrolling in tmux
8echo "setw -g mouse on" >> ~/.tmux.conf
9
10# Install: oh-my-zsh
11sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
12
13# Install Powerlevel10k
14git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
15sed -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
16
17# zsh-syntax-highlighting
18sudo apt install zsh-syntax-highlighting
19echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
20
21# zsh-autosuggestions
22git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
23sed -i -- 's/^plugins=(/plugins=(\n zsh-autosuggestions\n/g' ~/.zshrc
24
25# Install: timss/vimconf (https://github.com/timss/vimconf#installation)
26sudo apt install -y vim exuberant-ctags
27mkdir -p ~/.vim/vimconf
28git clone https://github.com/timss/vimconf.git ~/.vim/vimconf
29ln -s ~/.vim/vimconf/.vimrc ~/.vimrc
30
31# Add user to sudoers with no password
32echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
33sudo chmod 440 /etc/sudoers.d/$USER
34
35# Install public key
36KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILB5bVuBHYwgtCL+ppoOkKSpu/+wmSOt80yVE/S2qU0F"
37mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo "$KEY" >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
38