initial commit
This commit is contained in:
44
install/apt-packages.sh
Executable file
44
install/apt-packages.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Installing base apt packages..."
|
||||
|
||||
sudo apt update
|
||||
|
||||
PACKAGES=(
|
||||
# essentials
|
||||
build-essential
|
||||
curl
|
||||
wget
|
||||
git
|
||||
unzip
|
||||
zip
|
||||
stow
|
||||
|
||||
# terminal
|
||||
tmux
|
||||
|
||||
# search / file tools
|
||||
ripgrep
|
||||
fd-find
|
||||
tree
|
||||
|
||||
# network
|
||||
openssh-client
|
||||
rsync
|
||||
|
||||
# libs often needed for compiling things
|
||||
pkg-config
|
||||
libssl-dev
|
||||
libfontconfig1-dev
|
||||
)
|
||||
|
||||
sudo apt install -y "${PACKAGES[@]}"
|
||||
|
||||
if ! command -v fd &>/dev/null && command -v fdfind &>/dev/null; then
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
ln -sf "$(which fdfind)" "$HOME/.local/bin/fd"
|
||||
echo " linked fdfind -> fd"
|
||||
fi
|
||||
|
||||
echo "==> apt packages done."
|
||||
49
install/bootstrap.sh
Executable file
49
install/bootstrap.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# bootstrap.sh — run this on a fresh Linux Mint install
|
||||
set -euo pipefail
|
||||
|
||||
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
CONFIGS_DIR="$DOTFILES_DIR/configs"
|
||||
|
||||
echo "==> Dotfiles bootstrap"
|
||||
echo " dotfiles: $DOTFILES_DIR"
|
||||
echo ""
|
||||
|
||||
# ─── install packages and tools ───────────────────────────────────────────────
|
||||
bash "$CONFIGS_DIR/install/apt-packages.sh"
|
||||
bash "$CONFIGS_DIR/install/rust.sh"
|
||||
bash "$CONFIGS_DIR/install/docker.sh"
|
||||
bash "$CONFIGS_DIR/install/node.sh"
|
||||
bash "$CONFIGS_DIR/install/tools.sh"
|
||||
bash "$CONFIGS_DIR/install/fonts.sh"
|
||||
|
||||
# ─── symlink configs with stow ────────────────────────────────────────────────
|
||||
echo ""
|
||||
echo "==> Symlinking configs with stow..."
|
||||
|
||||
cd "$CONFIGS_DIR"
|
||||
|
||||
for group in shell tmux alacritty git vscode; do
|
||||
echo " stow $group -> ~"
|
||||
stow -v --target="$HOME" "$group"
|
||||
done
|
||||
|
||||
# ─── tmux plugins ─────────────────────────────────────────────────────────────
|
||||
echo ""
|
||||
echo "==> Installing tmux plugins (tpm)..."
|
||||
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
|
||||
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
|
||||
fi
|
||||
# install plugins headlessly
|
||||
"$HOME/.tmux/plugins/tpm/bin/install_plugins" || true
|
||||
|
||||
echo ""
|
||||
echo "==> Installing VSCode extensions..."
|
||||
if command -v code &>/dev/null; then
|
||||
grep -v '^#' "$CONFIGS_DIR/vscode/extensions.txt" | grep -v '^$' | xargs -L1 code --install-extension
|
||||
else
|
||||
echo " code not found, skipping extensions"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> Done! Open a new terminal or run: source ~/.bashrc"
|
||||
20
install/docker.sh
Executable file
20
install/docker.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Setting up Docker..."
|
||||
|
||||
if command -v docker &>/dev/null; then
|
||||
echo " docker already installed: $(docker --version)"
|
||||
else
|
||||
echo " installing docker engine..."
|
||||
# official docker install script (works on Ubuntu/Mint)
|
||||
curl -fsSL https://get.docker.com | sudo sh
|
||||
fi
|
||||
|
||||
# add current user to docker group so we don't need sudo
|
||||
if ! groups | grep -q docker; then
|
||||
sudo usermod -aG docker "$USER"
|
||||
echo " added $USER to docker group — log out and back in to apply"
|
||||
fi
|
||||
|
||||
echo "==> Docker done."
|
||||
27
install/fonts.sh
Executable file
27
install/fonts.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Installing fonts..."
|
||||
|
||||
FONTS_DIR="$HOME/.local/share/fonts"
|
||||
mkdir -p "$FONTS_DIR"
|
||||
|
||||
# FiraCode Nerd Font (includes FiraMono Nerd Font Mono)
|
||||
FIRA_VERSION="3.3.0"
|
||||
FIRA_ZIP="FiraCode.zip"
|
||||
FIRA_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/v${FIRA_VERSION}/${FIRA_ZIP}"
|
||||
|
||||
if fc-list | grep -qi "FiraCode Nerd Font"; then
|
||||
echo " FiraCode Nerd Font already installed, skipping"
|
||||
else
|
||||
echo " downloading FiraCode Nerd Font v${FIRA_VERSION}..."
|
||||
TMP_DIR=$(mktemp -d)
|
||||
curl -fsSL "$FIRA_URL" -o "$TMP_DIR/$FIRA_ZIP"
|
||||
unzip -q "$TMP_DIR/$FIRA_ZIP" -d "$TMP_DIR/fira"
|
||||
cp "$TMP_DIR"/fira/*.ttf "$FONTS_DIR/"
|
||||
rm -rf "$TMP_DIR"
|
||||
fc-cache -f "$FONTS_DIR"
|
||||
echo " FiraCode Nerd Font installed"
|
||||
fi
|
||||
|
||||
echo "==> Fonts done."
|
||||
29
install/node.sh
Executable file
29
install/node.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Setting up Node.js..."
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
if [ -d "$NVM_DIR" ]; then
|
||||
echo " nvm already installed, loading..."
|
||||
. "$NVM_DIR/nvm.sh"
|
||||
else
|
||||
echo " installing nvm..."
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
||||
. "$NVM_DIR/nvm.sh"
|
||||
fi
|
||||
|
||||
echo " installing node LTS..."
|
||||
nvm install --lts
|
||||
nvm use --lts
|
||||
nvm alias default node
|
||||
|
||||
echo "==> Installing pnpm..."
|
||||
if command -v pnpm &>/dev/null; then
|
||||
echo " pnpm already installed: $(pnpm --version)"
|
||||
else
|
||||
npm install -g pnpm
|
||||
fi
|
||||
|
||||
echo "==> Node done."
|
||||
38
install/rust.sh
Executable file
38
install/rust.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Setting up Rust..."
|
||||
|
||||
if command -v rustup &>/dev/null; then
|
||||
echo " rustup already installed, updating..."
|
||||
rustup update stable
|
||||
else
|
||||
echo " installing rustup..."
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
|
||||
rustup toolchain install stable
|
||||
rustup component add clippy rustfmt rust-analyzer
|
||||
|
||||
echo "==> Installing cargo tools..."
|
||||
|
||||
CARGO_TOOLS=(
|
||||
cargo-watch # watch for changes and re-run
|
||||
cargo-expand # expand macros
|
||||
cargo-nextest # faster test runner
|
||||
cargo-flamegraph # CPU profiling / flamegraphs
|
||||
cargo-deny # lint deps (licenses, duplicates, advisories)
|
||||
cargo-mutants # mutation testing
|
||||
cargo-audit # check deps for known vulnerabilities
|
||||
)
|
||||
|
||||
for tool in "${CARGO_TOOLS[@]}"; do
|
||||
if cargo install --list | grep -q "^${tool} "; then
|
||||
echo " $tool already installed, skipping"
|
||||
else
|
||||
cargo install "$tool"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "==> Rust done."
|
||||
11
install/tools.sh
Executable file
11
install/tools.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Installing extra tools..."
|
||||
|
||||
# ─── stow ─────────────────────────────────────────────────────────────────────
|
||||
if ! command -v stow &>/dev/null; then
|
||||
sudo apt install -y stow
|
||||
fi
|
||||
|
||||
echo "==> Extra tools done."
|
||||
Reference in New Issue
Block a user