# Dotfiles A cross-platform dotfiles repository managed with GNU Stow, compatible with both Debian Trixie and macOS. This repository contains configuration files for various development tools and applications to create a consistent environment across different systems. ## Overview This dotfiles repository uses [GNU Stow](https://www.gnu.org/software/stow/) to manage symlinks. ## Directory Structure ``` dotfiles/ ├── alacritty/ # Alacritty terminal emulator config ├── curl/ # curl configuration ├── git/ # Git configuration ├── nvim/ # Neovim configuration ├── scripts/ # Utility scripts ├── tmux/ # tmux configuration └── zsh/ # ZSH shell configuration ``` ## Dependencies ### Core Tools - **Terminal**: [Alacritty](https://github.com/alacritty/alacritty) - **Shell**: [ZSH](https://www.zsh.org/) - [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) - [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) (submodule) - [zsh-completions](https://github.com/zsh-users/zsh-completions) (submodule) - **Package Manager**: [Homebrew/Linuxbrew](https://brew.sh/) - **Dotfile Management**: [GNU Stow](https://www.gnu.org/software/stow/) ### Development Tools - [Rust](https://www.rust-lang.org/) toolchain (including rust-analyzer) - [Neovim](https://neovim.io/) - [tmux](https://github.com/tmux/tmux) + [tmux-plugin-manager](https://github.com/tmux-plugins/tpm) - [Terraform](https://www.terraform.io/) - python3-libtmux - Installed via `apt` in Debian. Remember to run `brew unlink python3` to prevent conflicting Python environments. - reattach-to-user-namespace (macOS only) ### Language Servers & Linters - Lua: lua-language-server, stylua, luacheck - JavaScript/TypeScript: prettier, prettier-plugin-go-template - Shell: shfmt, shellcheck, bash-language-server - Terraform: terraform-ls, tflint - Python: ruff ### Extras - lesspipe - cbonsai ## Installation ### Prerequisites 1. **Install Rust** ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup component add rust-analyzer ``` 2. **Install Homebrew** ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` 3. **Install tmux-plugin-manager** ```bash mkdir -p ~/.tmux/plugins git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm ``` ### Platform-Specific Setup #### Debian Trixie 1. **Install Terraform** ```bash wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com bookworm main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update && sudo apt install terraform ``` 2. **Install Dependencies** ```bash # System packages sudo apt install alacritty zsh tmux stow zsh-syntax-highlighting less python3-libtmux cbonsai shfmt shellcheck lua-check # Homebrew packages brew install neovim stylua lua-language-server bash-language-server prettier terraform-ls tflint ruff # Node packages npm install --save-dev prettier prettier-plugin-go-template # Prevent Python conflicts brew unlink python3 ``` #### macOS ```bash # Core tools brew install curl git alacritty zsh tmux stow zsh-syntax-highlighting lesspipe cbonsai reattach-to-user-namespace # Development tools brew install neovim stylua lua-language-server bash-language-server prettier terraform-ls tflint ruff # Node packages npm install --save-dev prettier prettier-plugin-go-template ``` ### Setup 1. **Clone this repository**: ```bash git clone --recurse-submodules https://github.com/yourusername/dotfiles.git ~/dotfiles cd ~/dotfiles ``` 2. **Deploy configurations using Stow**: ```bash stow zsh tmux git nvim curl alacritty wallpaper ``` 3. Change the default shell ```bash chsh -s /bin/zsh ``` 4. **Set up tmux plugins**: - Start a tmux session - Press `C-b I` to install plugins 5. **Git configuration**: - Create a `~/.gitconfig.local` file with personal config - See `~/.gitconfig.local.example` for reference ## Updating To update the dotfiles repository and all submodules: ```bash cd ~/dotfiles git pull git submodule update --init --recursive ```