From 947d444fab9765590db172b8ba1f2398f0b65882 Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Thu, 25 Dec 2025 15:46:17 -0500 Subject: [PATCH 1/6] missing install entrypoint for linux --- homebrew/install.sh | 6 ++++++ python/install.sh | 2 -- script/bootstrap | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) delete mode 100755 python/install.sh diff --git a/homebrew/install.sh b/homebrew/install.sh index a489f29ae8c..969dcc9bdc8 100755 --- a/homebrew/install.sh +++ b/homebrew/install.sh @@ -5,6 +5,12 @@ # This installs some of the common dependencies needed (or at least desired) # using Homebrew. +# Skip on Linux - homebrew setup is macOS-specific +if test "$(uname)" != "Darwin" +then + exit 0 +fi + # Check for Homebrew if test ! $(which brew) then diff --git a/python/install.sh b/python/install.sh deleted file mode 100755 index c93886f7ddd..00000000000 --- a/python/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -pip3 install --upgrade pip --user -pip3 install ranger-fm --user diff --git a/script/bootstrap b/script/bootstrap index 7d6584cc781..e047d0f4a2b 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -152,5 +152,40 @@ then fi fi +# If we're on Linux, install zsh and run installers +if [ "$(uname -s)" == "Linux" ] +then + info "setting up Linux environment" + + # Install zsh if not present + if ! command -v zsh &> /dev/null + then + info "installing zsh" + if command -v apt-get &> /dev/null + then + sudo apt-get update && sudo apt-get install -y zsh + elif command -v dnf &> /dev/null + then + sudo dnf install -y zsh + elif command -v yum &> /dev/null + then + sudo yum install -y zsh + elif command -v pacman &> /dev/null + then + sudo pacman -S --noconfirm zsh + else + fail "Could not detect package manager to install zsh" + fi + success "zsh installed" + else + success "zsh already installed" + fi + + # Run all install.sh scripts + info "running installers" + $DOTFILES_ROOT/script/install + success "installers completed" +fi + echo '' echo 'All installed!' From e70448cae672d7db9768e18ec6e95cd992a7b720 Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Sat, 21 Mar 2026 14:21:44 -0400 Subject: [PATCH 2/6] Update git config for Linux: SSH signing, LFS, and autocrlf --- git/gitconfig.symlink | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/git/gitconfig.symlink b/git/gitconfig.symlink index 905ecc220d4..77d115a0315 100644 --- a/git/gitconfig.symlink +++ b/git/gitconfig.symlink @@ -17,6 +17,7 @@ [core] excludesfile = ~/.gitignore editor = vim + autocrlf = input [apply] whitespace = nowarn [mergetool] @@ -33,3 +34,17 @@ default = simple [credential] helper = osxkeychain +[filter "lfs"] + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f +[gpg] + format = ssh +[gpg "ssh"] + program = /opt/1Password/op-ssh-sign + allowedSignersFile = /home/pettergriffin/.ssh/allowed_signers +[commit] + gpgsign = true +[user] + signingkey = /home/pettergriffin/.ssh/personal-git.pub From 78d2eca2d32f950a46a63f9e20ce9ecf4cf36cf9 Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Sat, 21 Mar 2026 14:21:54 -0400 Subject: [PATCH 3/6] Clean up zsh and p10k config for Linux compatibility Remove macOS-specific paths (homebrew, jenv, pyenv) from zshrc and comment out unused prompt segments (kubecontext, gcloud, google_app_cred). --- oh-my-zsh/p10k.zsh.symlink | 6 +++--- zsh/zshrc.symlink | 14 -------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/oh-my-zsh/p10k.zsh.symlink b/oh-my-zsh/p10k.zsh.symlink index 3111d6ae914..a093986dc63 100644 --- a/oh-my-zsh/p10k.zsh.symlink +++ b/oh-my-zsh/p10k.zsh.symlink @@ -72,14 +72,14 @@ phpenv # php version from phpenv (https://github.com/phpenv/phpenv) scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) haskell_stack # haskell version from stack (https://haskellstack.org/) - kubecontext # current kubernetes context (https://kubernetes.io/) + # kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) # terraform_version # terraform version (https://www.terraform.io) aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) - gcloud # google cloud cli account and project (https://cloud.google.com/) - google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + # gcloud # google cloud cli account and project (https://cloud.google.com/) + # google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) toolbox # toolbox name (https://github.com/containers/toolbox) context # user@hostname nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index 17bfb2638af..f5ca03772b7 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -70,17 +70,3 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=60' # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - - -export PATH="/opt/homebrew/opt/openjdk/bin:$PATH" -export JAVA_HOME="/opt/homebrew/opt/openjdk/" -export PATH="$HOME/.jenv/bin:$PATH" -eval "$(jenv init -)" - -export PYENV_ROOT="$HOME/.pyenv" -export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" -eval "$(pyenv init --path)" - -export PATH="$HOME/.poetry/bin:$PATH" From 6b5ab4d5479cc74355d1dfa2f29b976094f91f4c Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Sat, 21 Mar 2026 14:21:59 -0400 Subject: [PATCH 4/6] Rewrite node install script for cross-platform NVM setup Replace curl-based install with robust NVM installer that works on both macOS and Linux. Add path.zsh for NVM environment configuration. --- node/install.sh | 52 +++++++++++++++++++++++++++++++++++++++++++------ node/path.zsh | 6 ++++++ 2 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 node/path.zsh diff --git a/node/install.sh b/node/install.sh index 331d956641c..4edf0fc3e75 100755 --- a/node/install.sh +++ b/node/install.sh @@ -1,10 +1,50 @@ +#!/bin/bash +# +# Node.js and npm installation via NVM +# Works on both macOS and Linux -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash +set -e -if test ! $(which spoof) -then - if test $(which npm) - then - sudo npm install spoof -g +NVM_VERSION="v0.40.1" +NODE_VERSION="--lts" + +info() { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success() { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +# Install NVM if not present +if [ ! -d "$HOME/.nvm" ]; then + info "Installing NVM ${NVM_VERSION}..." + curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh" | bash + success "NVM installed" +else + success "NVM already installed" +fi + +# Load NVM for this script +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# Install Node.js LTS if not present +if ! command -v node &> /dev/null; then + info "Installing Node.js LTS..." + nvm install $NODE_VERSION + nvm use $NODE_VERSION + nvm alias default $NODE_VERSION + success "Node.js $(node --version) installed with npm $(npm --version)" +else + success "Node.js $(node --version) already installed" +fi + +# Install global npm packages +if command -v npm &> /dev/null; then + if ! command -v spoof &> /dev/null; then + info "Installing spoof globally..." + npm install -g spoof + success "spoof installed" fi fi diff --git a/node/path.zsh b/node/path.zsh new file mode 100644 index 00000000000..45df3a332fe --- /dev/null +++ b/node/path.zsh @@ -0,0 +1,6 @@ +# NVM (Node Version Manager) configuration +# https://github.com/nvm-sh/nvm + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" From e287e169eb634570d5dc02608d657bf763f9642e Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Sat, 21 Mar 2026 14:22:03 -0400 Subject: [PATCH 5/6] Add install scripts for kubernetes, terraform, gh, java, linux, and obsidian New tool installer modules with install scripts, aliases, and path configurations for the Linux bootstrap setup. --- gh/install.sh | 56 ++++++++++ java/install.sh | 85 ++++++++++++++ kubernetes/aliases.zsh | 34 ++++++ kubernetes/install.sh | 246 +++++++++++++++++++++++++++++++++++++++++ kubernetes/path.zsh | 9 ++ linux/install.sh | 29 +++++ obsidian/install.sh | 148 +++++++++++++++++++++++++ terraform/aliases.zsh | 11 ++ terraform/install.sh | 103 +++++++++++++++++ 9 files changed, 721 insertions(+) create mode 100755 gh/install.sh create mode 100755 java/install.sh create mode 100644 kubernetes/aliases.zsh create mode 100755 kubernetes/install.sh create mode 100644 kubernetes/path.zsh create mode 100755 linux/install.sh create mode 100755 obsidian/install.sh create mode 100644 terraform/aliases.zsh create mode 100755 terraform/install.sh diff --git a/gh/install.sh b/gh/install.sh new file mode 100755 index 00000000000..1cce36ae57b --- /dev/null +++ b/gh/install.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# GitHub CLI installation for Debian/Ubuntu-based systems + +set -e + +info() { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success() { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +# Skip on non-Linux systems +if [ "$(uname)" != "Linux" ]; then + exit 0 +fi + +# Skip if apt-get is not available +if ! command -v apt-get > /dev/null 2>&1; then + info "Skipping gh CLI (apt-get not found)" + exit 0 +fi + +# Check if gh is already installed +if command -v gh > /dev/null 2>&1; then + success "GitHub CLI $(gh --version | head -n1) already installed" + exit 0 +fi + +info "Installing GitHub CLI..." + +# Ensure wget is available +if ! command -v wget > /dev/null 2>&1; then + sudo apt-get update + sudo apt-get install -y wget +fi + +# Set up GPG keyring +sudo mkdir -p -m 755 /etc/apt/keyrings +out=$(mktemp) +wget -nv -O"$out" https://cli.github.com/packages/githubcli-archive-keyring.gpg +cat "$out" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null +rm "$out" +sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg + +# Add the official repository +sudo mkdir -p -m 755 /etc/apt/sources.list.d +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null + +# Install GitHub CLI +sudo apt-get update +sudo apt-get install -y gh + +success "GitHub CLI $(gh --version | head -n1) installed" diff --git a/java/install.sh b/java/install.sh new file mode 100755 index 00000000000..2c4f4a43072 --- /dev/null +++ b/java/install.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# +# JDK (Java Development Kit) +# +# Installs the default JDK package. +# Supports macOS, Ubuntu/Debian, Arch Linux, and Fedora/RHEL. + +set -e + +info () { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success () { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +fail () { + printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n" +} + +# Detect OS and package manager +detect_platform() { + OS="$(uname -s)" + PKG_MANAGER="" + + if [ "$OS" = "Darwin" ]; then + PKG_MANAGER="brew" + elif [ "$OS" = "Linux" ]; then + if command -v apt-get > /dev/null 2>&1; then + PKG_MANAGER="apt" + elif command -v pacman > /dev/null 2>&1; then + PKG_MANAGER="pacman" + elif command -v dnf > /dev/null 2>&1; then + PKG_MANAGER="dnf" + elif command -v yum > /dev/null 2>&1; then + PKG_MANAGER="yum" + fi + fi +} + +install_jdk() { + if command -v javac > /dev/null 2>&1; then + success "JDK already installed ($(javac -version 2>&1))" + return 0 + fi + + info "installing JDK" + + case "$PKG_MANAGER" in + brew) + brew install openjdk + success "JDK installed" + ;; + apt) + sudo apt-get update + sudo apt-get install -y default-jdk + success "JDK installed" + ;; + pacman) + sudo pacman -S --noconfirm jdk-openjdk + success "JDK installed" + ;; + dnf) + sudo dnf install -y java-latest-openjdk-devel + success "JDK installed" + ;; + yum) + sudo yum install -y java-latest-openjdk-devel + success "JDK installed" + ;; + *) + fail "unsupported package manager for JDK" + return 1 + ;; + esac +} + +# Main +detect_platform +info "detected platform: $OS ($PKG_MANAGER)" + +install_jdk + +exit 0 diff --git a/kubernetes/aliases.zsh b/kubernetes/aliases.zsh new file mode 100644 index 00000000000..fdd04c30822 --- /dev/null +++ b/kubernetes/aliases.zsh @@ -0,0 +1,34 @@ +# kubectl aliases +alias k='kubectl' +alias kx='kubectx' +alias kn='kubens' +alias kgp='kubectl get pods' +alias kgs='kubectl get services' +alias kgd='kubectl get deployments' +alias kgn='kubectl get nodes' +alias kga='kubectl get all' +alias kd='kubectl describe' +alias kdp='kubectl describe pod' +alias kds='kubectl describe service' +alias kdd='kubectl describe deployment' +alias kl='kubectl logs' +alias klf='kubectl logs -f' +alias ke='kubectl exec -it' +alias kaf='kubectl apply -f' +alias kdf='kubectl delete -f' +alias kctx='kubectl config current-context' +alias kns='kubectl config view --minify --output "jsonpath={..namespace}"' + +# helm aliases +alias h='helm' +alias hi='helm install' +alias hu='helm upgrade' +alias hup='helm upgrade --install' +alias hd='helm delete' +alias hl='helm list' +alias hla='helm list -A' +alias hs='helm search repo' +alias hr='helm repo' +alias hra='helm repo add' +alias hru='helm repo update' +alias hv='helm show values' diff --git a/kubernetes/install.sh b/kubernetes/install.sh new file mode 100755 index 00000000000..854bb11b472 --- /dev/null +++ b/kubernetes/install.sh @@ -0,0 +1,246 @@ +#!/bin/sh +# +# Kubernetes tools +# +# Installs kubectl, helm, and Google Cloud SDK for connecting to k8s clusters. +# Supports macOS, Ubuntu/Debian, and Arch Linux. + +set -e + +info () { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success () { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +fail () { + printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n" +} + +# Detect OS and package manager +detect_platform() { + OS="$(uname -s)" + DISTRO="" + PKG_MANAGER="" + + if [ "$OS" = "Darwin" ]; then + PKG_MANAGER="brew" + elif [ "$OS" = "Linux" ]; then + if command -v apt-get > /dev/null 2>&1; then + PKG_MANAGER="apt" + DISTRO="debian" + elif command -v pacman > /dev/null 2>&1; then + PKG_MANAGER="pacman" + DISTRO="arch" + elif command -v dnf > /dev/null 2>&1; then + PKG_MANAGER="dnf" + DISTRO="fedora" + elif command -v yum > /dev/null 2>&1; then + PKG_MANAGER="yum" + DISTRO="rhel" + fi + fi +} + +# Install kubectl +install_kubectl() { + if command -v kubectl > /dev/null 2>&1; then + success "kubectl already installed" + return 0 + fi + + info "installing kubectl" + + case "$PKG_MANAGER" in + brew) + # Skip - homebrew/install.sh already handles this + success "kubectl installed via homebrew" + ;; + apt) + # Install kubectl via official apt repository + sudo apt-get update + sudo apt-get install -y apt-transport-https ca-certificates curl gnupg + + # Add Kubernetes apt key + curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg --yes + sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg + + # Add Kubernetes apt repository + echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list + sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list + + sudo apt-get update + sudo apt-get install -y kubectl + success "kubectl installed" + ;; + pacman) + sudo pacman -S --noconfirm kubectl + success "kubectl installed" + ;; + dnf) + # Fedora/RHEL with dnf + cat < /dev/null 2>&1; then + success "gcloud SDK already installed" + return 0 + fi + + info "installing Google Cloud SDK" + + case "$PKG_MANAGER" in + brew) + brew install --cask google-cloud-sdk + success "gcloud SDK installed" + ;; + apt) + # Install gcloud via official apt repository + sudo apt-get install -y apt-transport-https ca-certificates gnupg curl + + # Add Google Cloud apt key + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg --yes + sudo chmod 644 /usr/share/keyrings/cloud.google.gpg + + # Add Google Cloud apt repository + echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list + + sudo apt-get update + sudo apt-get install -y google-cloud-cli google-cloud-cli-gke-gcloud-auth-plugin + success "gcloud SDK installed" + ;; + pacman) + # Install from AUR using yay or paru, or fallback to manual install + if command -v yay > /dev/null 2>&1; then + yay -S --noconfirm google-cloud-cli + elif command -v paru > /dev/null 2>&1; then + paru -S --noconfirm google-cloud-cli + else + # Fallback: install via official script + info "no AUR helper found, installing via official script" + install_gcloud_manual + return $? + fi + success "gcloud SDK installed" + ;; + dnf|yum) + # Install via official script for Fedora/RHEL + install_gcloud_manual + return $? + ;; + *) + fail "unsupported package manager for gcloud" + return 1 + ;; + esac +} + +# Install Helm +install_helm() { + if command -v helm > /dev/null 2>&1; then + success "helm already installed" + return 0 + fi + + info "installing helm" + + case "$PKG_MANAGER" in + brew) + # Skip - homebrew/install.sh already handles this + success "helm installed via homebrew" + ;; + pacman) + sudo pacman -S --noconfirm helm + success "helm installed" + ;; + *) + # Use official install script for all other platforms (most reliable) + curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + success "helm installed" + ;; + esac +} + +# Manual gcloud installation via official script (fallback) +install_gcloud_manual() { + info "installing gcloud SDK via official installer" + + GCLOUD_DIR="$HOME/.local/google-cloud-sdk" + + if [ -d "$GCLOUD_DIR" ]; then + success "gcloud SDK directory already exists at $GCLOUD_DIR" + return 0 + fi + + # Download and extract + curl -o /tmp/google-cloud-cli.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz + mkdir -p "$HOME/.local" + tar -xzf /tmp/google-cloud-cli.tar.gz -C "$HOME/.local" + rm /tmp/google-cloud-cli.tar.gz + + # Run install script (non-interactive) + "$GCLOUD_DIR/install.sh" --quiet --path-update=false --command-completion=false + + success "gcloud SDK installed to $GCLOUD_DIR" + info "add to PATH: export PATH=\"\$HOME/.local/google-cloud-sdk/bin:\$PATH\"" +} + +# Main +detect_platform +info "detected platform: $OS ($PKG_MANAGER)" + +install_kubectl +install_helm +install_gcloud + +# Install gke-gcloud-auth-plugin if gcloud is available +if command -v gcloud > /dev/null 2>&1; then + if ! gcloud components list 2>/dev/null | grep -q "gke-gcloud-auth-plugin.*Installed"; then + info "installing gke-gcloud-auth-plugin" + case "$PKG_MANAGER" in + apt) + # Already installed with google-cloud-cli-gke-gcloud-auth-plugin + ;; + brew) + gcloud components install gke-gcloud-auth-plugin --quiet 2>/dev/null || true + ;; + *) + gcloud components install gke-gcloud-auth-plugin --quiet 2>/dev/null || true + ;; + esac + fi +fi + +exit 0 diff --git a/kubernetes/path.zsh b/kubernetes/path.zsh new file mode 100644 index 00000000000..1c6b038c97a --- /dev/null +++ b/kubernetes/path.zsh @@ -0,0 +1,9 @@ +# Google Cloud SDK path (for manual installation) +if [ -d "$HOME/.local/google-cloud-sdk" ]; then + export PATH="$HOME/.local/google-cloud-sdk/bin:$PATH" +fi + +# kubectl autocompletion +if command -v kubectl > /dev/null 2>&1; then + source <(kubectl completion zsh) 2>/dev/null +fi diff --git a/linux/install.sh b/linux/install.sh new file mode 100755 index 00000000000..cff19ab04fd --- /dev/null +++ b/linux/install.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Linux APT packages +# +# This installs common utilities on Debian/Ubuntu-based systems. + +# Skip on non-Linux systems +if test "$(uname)" != "Linux" +then + exit 0 +fi + +# Skip if apt-get is not available +if ! command -v apt-get > /dev/null 2>&1 +then + echo " Skipping apt packages (apt-get not found)" + exit 0 +fi + +echo " Installing apt packages..." + +sudo apt-get update + +# Utilities +sudo apt-get install -y gnome-shell-pomodoro +sudo apt-get install -y flameshot +sudo apt-get install -y chromium-browser + +exit 0 diff --git a/obsidian/install.sh b/obsidian/install.sh new file mode 100755 index 00000000000..56a5d163c25 --- /dev/null +++ b/obsidian/install.sh @@ -0,0 +1,148 @@ +#!/bin/sh +# +# Obsidian +# +# Installs Obsidian note-taking app. +# Supports macOS, Ubuntu/Debian (via Snap or AppImage), Arch Linux, and Fedora. + +set -e + +OBSIDIAN_VERSION="1.7.7" + +info () { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success () { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +fail () { + printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n" +} + +# Detect OS and package manager +detect_platform() { + OS="$(uname -s)" + DISTRO="" + PKG_MANAGER="" + + if [ "$OS" = "Darwin" ]; then + PKG_MANAGER="brew" + elif [ "$OS" = "Linux" ]; then + if command -v apt-get > /dev/null 2>&1; then + PKG_MANAGER="apt" + DISTRO="debian" + elif command -v pacman > /dev/null 2>&1; then + PKG_MANAGER="pacman" + DISTRO="arch" + elif command -v dnf > /dev/null 2>&1; then + PKG_MANAGER="dnf" + DISTRO="fedora" + fi + fi +} + +# Install Obsidian via AppImage (universal Linux fallback) +install_appimage() { + APPIMAGE_DIR="$HOME/.local/bin" + APPIMAGE_PATH="$APPIMAGE_DIR/Obsidian.AppImage" + DESKTOP_FILE="$HOME/.local/share/applications/obsidian.desktop" + + if [ -f "$APPIMAGE_PATH" ]; then + success "Obsidian AppImage already installed" + return 0 + fi + + info "downloading Obsidian AppImage v${OBSIDIAN_VERSION}..." + + mkdir -p "$APPIMAGE_DIR" + mkdir -p "$HOME/.local/share/applications" + + curl -L -o "$APPIMAGE_PATH" \ + "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/Obsidian-${OBSIDIAN_VERSION}.AppImage" + + chmod +x "$APPIMAGE_PATH" + + # Create desktop entry + cat > "$DESKTOP_FILE" << EOF +[Desktop Entry] +Name=Obsidian +Exec=$APPIMAGE_PATH %u +Terminal=false +Type=Application +Icon=obsidian +Categories=Office; +MimeType=x-scheme-handler/obsidian; +EOF + + success "Obsidian AppImage installed to $APPIMAGE_PATH" +} + +# Install Obsidian +install_obsidian() { + if command -v obsidian > /dev/null 2>&1; then + success "Obsidian already installed" + return 0 + fi + + # Check for AppImage + if [ -f "$HOME/.local/bin/Obsidian.AppImage" ]; then + success "Obsidian already installed (AppImage)" + return 0 + fi + + info "installing Obsidian" + + case "$PKG_MANAGER" in + brew) + brew install --cask obsidian + success "Obsidian installed via Homebrew" + ;; + apt) + # Try snap first (most reliable on Ubuntu/Debian) + if command -v snap > /dev/null 2>&1; then + sudo snap install obsidian --classic + success "Obsidian installed via Snap" + else + # Fallback to AppImage + install_appimage + fi + ;; + pacman) + # Install from AUR using yay or paru + if command -v yay > /dev/null 2>&1; then + yay -S --noconfirm obsidian + success "Obsidian installed via AUR (yay)" + elif command -v paru > /dev/null 2>&1; then + paru -S --noconfirm obsidian + success "Obsidian installed via AUR (paru)" + else + # Fallback to AppImage + info "no AUR helper found, using AppImage" + install_appimage + fi + ;; + dnf) + # Fedora: try flatpak first, then AppImage + if command -v flatpak > /dev/null 2>&1; then + flatpak install -y flathub md.obsidian.Obsidian + success "Obsidian installed via Flatpak" + else + install_appimage + fi + ;; + *) + # Universal fallback: AppImage + install_appimage + ;; + esac +} + +# Main +detect_platform +info "detected platform: $OS ($PKG_MANAGER)" + +install_obsidian + +exit 0 diff --git a/terraform/aliases.zsh b/terraform/aliases.zsh new file mode 100644 index 00000000000..5ca1ceaff33 --- /dev/null +++ b/terraform/aliases.zsh @@ -0,0 +1,11 @@ +# terraform aliases +alias tf='terraform' +alias tfi='terraform init' +alias tfp='terraform plan' +alias tfa='terraform apply' +alias tfd='terraform destroy' +alias tff='terraform fmt' +alias tfv='terraform validate' +alias tfo='terraform output' +alias tfs='terraform state' +alias tfw='terraform workspace' diff --git a/terraform/install.sh b/terraform/install.sh new file mode 100755 index 00000000000..818f2d3b4ae --- /dev/null +++ b/terraform/install.sh @@ -0,0 +1,103 @@ +#!/bin/sh +# +# Terraform +# +# Installs Terraform for infrastructure as code. +# Supports macOS, Ubuntu/Debian, and Arch Linux. + +set -e + +info () { + printf "\r [ \033[00;34m..\033[0m ] $1\n" +} + +success () { + printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n" +} + +fail () { + printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n" +} + +# Detect OS and package manager +detect_platform() { + OS="$(uname -s)" + PKG_MANAGER="" + + if [ "$OS" = "Darwin" ]; then + PKG_MANAGER="brew" + elif [ "$OS" = "Linux" ]; then + if command -v apt-get > /dev/null 2>&1; then + PKG_MANAGER="apt" + elif command -v pacman > /dev/null 2>&1; then + PKG_MANAGER="pacman" + elif command -v dnf > /dev/null 2>&1; then + PKG_MANAGER="dnf" + elif command -v yum > /dev/null 2>&1; then + PKG_MANAGER="yum" + fi + fi +} + +install_terraform() { + if command -v terraform > /dev/null 2>&1; then + success "terraform already installed" + return 0 + fi + + info "installing terraform" + + case "$PKG_MANAGER" in + brew) + brew tap hashicorp/tap + brew install hashicorp/tap/terraform + success "terraform installed" + ;; + apt) + # Install via HashiCorp apt repository + sudo apt-get update + sudo apt-get install -y gnupg software-properties-common curl + + # Add HashiCorp GPG key + curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg --yes + sudo chmod 644 /usr/share/keyrings/hashicorp-archive-keyring.gpg + + # Add HashiCorp repository + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + + sudo apt-get update + sudo apt-get install -y terraform + success "terraform installed" + ;; + pacman) + sudo pacman -S --noconfirm terraform + success "terraform installed" + ;; + dnf) + # Install via HashiCorp yum repository + sudo dnf install -y dnf-plugins-core + sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo + sudo dnf install -y terraform + success "terraform installed" + ;; + yum) + # Install via HashiCorp yum repository + sudo yum install -y yum-utils + sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo + sudo yum install -y terraform + success "terraform installed" + ;; + *) + fail "unsupported package manager for terraform" + return 1 + ;; + esac +} + +# Main +detect_platform +info "detected platform: $OS ($PKG_MANAGER)" + +install_terraform + +exit 0 From 1c7eefed2909837a976da47cbb598261f28ea37f Mon Sep 17 00:00:00 2001 From: selvam palanimalai Date: Sat, 21 Mar 2026 14:22:07 -0400 Subject: [PATCH 6/6] Add Claude Code local settings --- .claude/settings.local.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000000..19e25913471 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,13 @@ +{ + "permissions": { + "allow": [ + "Bash(cat:*)", + "Bash(git ls-tree:*)", + "Bash(find:*)", + "Bash(chmod:*)", + "Bash(bash:*)", + "Bash(git add:*)", + "Bash(git commit:*)" + ] + } +}