1
0

Improve README

This commit is contained in:
2025-04-01 20:21:25 +02:00
parent b0cbc93c8a
commit ef5a97eb61
3 changed files with 156 additions and 51 deletions

196
README.md
View File

@@ -1,66 +1,162 @@
# DOTFILES # 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 ## Dependencies
- alacritty ### Core Tools
- zsh
- zsh-autosuggestions - **Terminal**: [Alacritty](https://github.com/alacritty/alacritty)
- zsh-completions - **Shell**: [ZSH](https://www.zsh.org/)
- homebrew/linuxbrew - [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting)
- stow - [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions)
- rust toolchain (submodule)
- starship - [zsh-completions](https://github.com/zsh-users/zsh-completions)
- tmux (submodule)
- tmux-plugin-manager - **Package Manager**: [Homebrew/Linuxbrew](https://brew.sh/)
- reattach-to-user-namespace (MacOS) - **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 - python3-libtmux
- neovim - Installed via `apt` in Debian. Remember to run `brew unlink python3` to
- lua-language-server prevent conflicting Python environments.
- stylua - reattach-to-user-namespace (macOS only)
- luacheck
- prettier ### Language Servers & Linters
- prettier-plugin-go-template
- rust-analyzer - Lua: lua-language-server, stylua, luacheck
- shfmt - JavaScript/TypeScript: prettier, prettier-plugin-go-template
- shellcheck - Shell: shfmt, shellcheck, bash-language-server
- bash-language-server - Terraform: terraform-ls, tflint
- terraform - Python: ruff
- terraform-ls
- tflint ### Extras
- ruff
- lesspipe
- cbonsai - cbonsai
# Git Configuration ## Installation
This directory contains Git configuration files that can be safely shared in a ### Prerequisites
public repository.
## Setup Instructions 1. **Install Rust**
1. Create a symbolic link for the main Git config: ```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup component add rust-analyzer
```
``` 2. **Install Homebrew**
ln -sf ~/dotfiles/git/.gitconfig ~/.gitconfig
```
2. Create your personal Git configuration: ```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
``` 3. **Install tmux-plugin-manager**
cp ~/dotfiles/git/.gitconfig.local.example ~/.gitconfig.local
```
3. Edit `~/.gitconfig.local` with your personal information: ```bash
``` mkdir -p ~/.tmux/plugins
[user] git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
name = Your Name ```
email = your.email@example.com
```
## Structure ### Platform-Specific Setup
- `.gitconfig`: Main configuration file with shareable settings #### Debian Trixie
- `.gitconfig.local.example`: Template for personal/private Git settings
- `~/.gitconfig.local`: (Not tracked) Your personal Git configuration
This approach keeps your personal information out of the public repository while 1. **Install Terraform**
still allowing you to manage and version your Git configuration.
```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
```
3. **Set up tmux plugins**:
- Start a tmux session
- Press `C-b I` to install plugins
4. **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
```

View File

@@ -0,0 +1,5 @@
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = Full Name
email = user.name@email.com

View File

@@ -29,7 +29,11 @@ case "$(uname -s)" in
Linux*) { Linux*) {
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# make less more friendly for non-text input files, see lesspipe(1) # make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" local lesspipe_bin_location
lesspipe_bin_location=$(which lesspipe)
if [ $? -eq 0 ]; then
[ -x $lesspipe_bin_location ] && eval "$(lesspipe)"
fi
} ;; } ;;
Darwin*) { Darwin*) {
source "$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" source "$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"