Skip to content
ipetr0vPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Dotfiles

Personal shell, editor and CLI config. Managed with GNU Stow.

Setup on a new machine

1. Install packages

Ubuntu / Debian

sudo apt update && sudo apt upgrade -y
sudo apt install -y \
    git stow curl \
    vim tmux \
    bat fd-find ripgrep eza \
    fzf zoxide \
    htop tree jq \
    python3 python3-venv python3-pip pipx \
    zsh
pipx install uv

On Debian/Ubuntu the bat and fd binaries are installed as batcat and fdfind due to package-name conflicts with older tools. The shell rc files alias them back to bat / fd automatically.

Starship (prompt) isn't reliably packaged in apt — install via the upstream script:

curl -sS https://starship.rs/install.sh | sh
macOS
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew install \
    stow \
    vim tmux \
    bat fd ripgrep eza \
    fzf zoxide \
    htop tree jq \
    python uv \
    starship \
    zsh

2. Clone and stow

git clone https://github.com/ipetr0v/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
stow home

stow home symlinks everything under ~/.dotfiles/home/ into $HOME, preserving directory structure. To remove: stow -D home.

3. Set zsh as default shell (optional)

chsh -s "$(command -v zsh)"

4. Lean 4 (optional)

Both shells export ELAN_HOME=~/.local/share/elan and prepend $ELAN_HOME/bin to PATH. Install elan with --no-modify-path so it uses the XDG directory and leaves dotfiles untouched:

curl -sSfL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh \
    | ELAN_HOME=~/.local/share/elan sh -s -- -y --no-modify-path --default-toolchain leanprover/lean4:stable

5. Node.js (optional)

Both shells point npm's cache, config, REPL history and global prefix at XDG dirs, so npm install -g writes to ~/.local/share/npm (already on PATH) and never needs sudo:

sudo apt install -y nodejs npm

6. LaTeX (optional)

Both shells point TeX Live's user tree, cache and config (TEXMFHOME, TEXMFVAR, TEXMFCONFIG) at XDG dirs instead of ~/texmf and ~/.texliveYYYY/.

Ubuntu / Debian

sudo apt install -y \
    latexmk biber latexdiff chktex \
    texlive-latex-base texlive-latex-recommended texlive-latex-extra \
    texlive-plain-generic texlive-publishers texlive-science \
    texlive-bibtex-extra texlive-fonts-recommended texlive-fonts-extra \
    texlive-pictures texlive-luatex texlive-xetex \
    texlive-extra-utils texlive-font-utils texlive-lang-english
macOS
brew install --cask mactex-no-gui

7. Per-machine config

These files are gitignored — create per machine as needed:

File Purpose
~/.bashrc.local bash overrides
~/.config/zsh/.zshrc.local zsh overrides
~/.vimrc.local vim overrides (e.g. set clipboard=unnamedplus on desktop)
~/.config/git/config git identity (different for personal/work machines)
~/.secrets API tokens, etc. — sourced by both shells if present

Terminal: Ghostty

Ghostty is the desktop terminal emulator (on Windows, WSL runs under Windows Terminal instead).

Ubuntu / Debian

Not in the default apt repos — install via the community .deb (mkasberg/ghostty-ubuntu), or see the install guide for other options.

Ghostty uses its own xterm-ghostty terminfo — present locally, but not on most remote servers, so SSH sessions can show a garbled prompt. Copy the entry to a server once (the dotfiles already add ~/.local/share/terminfo to the terminfo search path):

infocmp -x xterm-ghostty | ssh user@host -- tic -x -o '$HOME/.local/share/terminfo' -
macOS
brew install --cask ghostty

Layout

Everything that maps into $HOME lives under home/ (the single stow package). Repo-meta (README, .git) stays at the root, so there's nothing to ignore.

~/.dotfiles/
├── README.md
├── .gitignore
└── home/                      # stow package — mirrors $HOME
    ├── .bashrc
    ├── .zshenv
    ├── .vimrc
    └── .config/
        ├── zsh/               # .zshrc, plugins.zsh, aliases.zsh, zsh_plugins.txt
        ├── nix/nix.conf       # Nix: flakes + XDG base directories
        ├── bat/config
        ├── python/startup.py
        └── starship.toml

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages