From f88565f29f3be626f08c78719be94fe95eeb22b5 Mon Sep 17 00:00:00 2001 From: sam rolfe Date: Mon, 6 Oct 2025 17:53:14 +1100 Subject: [PATCH] Scripts to install any software for the terminals --- .config/nushell/history.txt | 17 ++++++++++++ install.sh | 55 +++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100755 install.sh diff --git a/.config/nushell/history.txt b/.config/nushell/history.txt index b6ad01e..eb9abff 100644 --- a/.config/nushell/history.txt +++ b/.config/nushell/history.txt @@ -6,3 +6,20 @@ lazygit nvim ~/dotfiles/manage_configs.sh chmod +x ~/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 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..e93c72d --- /dev/null +++ b/install.sh @@ -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."