Scripts to install any software for the terminals

This commit is contained in:
2025-10-06 17:53:14 +11:00
parent e35b894b5d
commit f88565f29f
2 changed files with 72 additions and 0 deletions

View File

@ -6,3 +6,20 @@ lazygit
nvim ~/dotfiles/manage_configs.sh nvim ~/dotfiles/manage_configs.sh
chmod +x ~/dotfiles/manage_configs.sh chmod +x ~/dotfiles/manage_configs.sh
~/dotfiles/manage_configs.sh ~/dotfiles/manage_configs.sh
lazygit
ssh -vT git@gitea.lab.audasmedia.com.au
nvim ~/.ssh/config
chmod 600 ~/.ssh/config
ssh -vT git@gitea.lab.audasmedia.com.au
nvim ~/.ssh/config
lazygit
cat ~/.ssh/id_ed25519.pub
sudo su - git
git remote -v
GIT_SSH_COMMAND="ssh -v" git push
git remote set-url origin ssh://git@gitea.lab.audasmedia.com.au:2222/sam/dotfiles.git
git branch -m master main
git push --set-upstream origin main
lazygit
nvim ~/dotfiles/install.sh
chmod +x ~/dotfiles/install.sh

55
install.sh Executable file
View File

@ -0,0 +1,55 @@
#!/bin/bash
# A script to install all the software and tools for the dotfiles environment.
echo "--- Starting Environment Setup ---"
# --- 1. Install Core Packages with APT ---
echo "--> Installing core packages with apt..."
sudo apt update
sudo apt install -y build-essential curl git zsh ripgrep btop bat zoxide eza fuse3 sshfs gh
# --- 2. Install Oh My Zsh and Required Plugins (Non-interactive) ---
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "--> Installing Oh My Zsh..."
# The --unattended flag runs the installer without prompts
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
echo "--> Installing OMZ plugins (P10k, Autosuggestions, Syntax Highlighting)..."
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
else
echo "--> Oh My Zsh already installed. Skipping."
fi
# --- 3. Install Rust and Cargo ---
if ! command -v cargo &> /dev/null; then
echo "--> Installing Rust and Cargo..."
# The -y flag answers "yes" to the default installation prompt
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Add cargo to the current session's PATH
source "$HOME/.cargo/env"
else
echo "--> Rust/Cargo already installed. Skipping."
fi
# --- 4. Install Tools with Cargo ---
echo "--> Installing Cargo packages (atuin, zellij, starship, etc.)..."
cargo install atuin zellij dua-cli navi tealdeer starship yazi-fm
# --- 5. Install FZF ---
if [ ! -d "$HOME/.fzf" ]; then
echo "--> Installing FZF..."
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
# The --all flag answers "yes" to all installer questions
~/.fzf/install --all
else
echo "--> FZF already installed. Skipping."
fi
echo "--- Software installation complete! ---"
echo "Next steps:"
echo "1. Run 'chsh -s $(which zsh)' to set Zsh as your default shell."
echo "2. Run the 'manage_configs.sh' script to symlink your configuration files."
echo "3. Log out and log back in for all changes to take effect."