This site is driven by two keys, like the machine it came from. Reading: j and k scroll, d and u move half a page, gg goes to the top, G to the bottom, H and L switch windows, ? opens the help. Space is the Neovim leader and handles content: Space then h home, r research, p projects, g gear, a about, / tags, or Space then a digit to jump to that window. Home is the tmux prefix and handles windows: Home then c opens a terminal, Home then & closes a window, Home then space goes to the next one. While focus is on the keyboard, h j k l move between keys and Enter opens one.

ResearchR AboutA Gear: G for gear, keyboard, terminal, editor, homelab.G
    ProjectsP Tags: / as in vim: search./
    ×
    Menu

    Dotfiles: Workstation Bootstrap with GNU Stow

    Terminal, editor and macOS window-manager config in one repo that installs the same way on macOS and Debian: GNU Stow links it, install.sh sets the machine up, and anything machine-specific stays outside.

    A single repository that holds my workstation config: terminal, editor, window manager, shell, git and ssh. The README’s first line sets the rule: “One repo, identical on every macOS and Debian machine.” Anything that belongs to one machine lives outside the repo and is attached through optional hooks.

    Philosophy

    Each tool gets one directory in the repo. GNU Stow symlinks that directory into the actual config location under $HOME or ~/.config. The practical consequences:

    • Single source of truth. Edit config in the repo, the change is live on the system instantly.
    • No copy-paste. No “copy this file to ~/.config/...” step that’s easy to forget on updates.
    • Reversible. stow -D unlinks cleanly without leaving residue.
    • Nothing machine-specific in git. Per-machine shell code goes in ~/.config/dotfiles/modules/*.zsh, private config comes from plugins in ~/.config/dotfiles/plugins/, and files like git/config.local or ~/.config/tmux/local.conf are included only if present. The repo never names what those contain.

    Two files are deliberately not linked, because the app rewrites them in place: Karabiner’s karabiner.json (rules are merged into it by a script) and Claude Code’s settings.json (copied once, never overwritten).

    Repo Layout

    dotfiles/
    ├── aerospace/        # tiling window manager (macOS)
    ├── sketchybar/       # status bar (macOS)
    ├── borders/          # window borders (macOS)
    ├── hammerspoon/      # URL handler that opens browser links in a running nvim (macOS)
    ├── karabiner/        # tmux-style prefix in the browser, merged not stowed (macOS)
    ├── ghostty/          # terminal
    ├── alacritty/        # second terminal config
    ├── tmux/             # multiplexer
    ├── nvim/             # Neovim, lazy.nvim
    ├── vim/              # Vim fallback
    ├── zsh/              # .zshrc, alias files, prompt
    ├── git/  ssh/        # config with a local include for the per-machine part
    ├── claude/           # Claude Code instructions, hooks, skills
    ├── mise/             # version manager
    ├── yazi/  joshuto/   # TUI file managers
    ├── htop/  lynx/  nix/  rainfrog/
    ├── fonts/            # Blex Mono and Hack Nerd Fonts
    ├── docs/             # architecture, shell, secrets, git-ssh, desktop, plugins
    ├── Brewfile          # 44 formulas, 13 casks, 6 taps
    ├── __scripts__/      # installers, dots-sync, secret scanner, nvim-open
    ├── .githooks/        # pre-commit, pre-push, post-merge
    └── install.sh        # bootstrap entrypoint

    Bootstrap

    From a fresh machine:

    git clone [email protected]:arisros/dotfiles.git ~/dotfiles
    cd ~/dotfiles && ./install.sh
    zsh -i -c 'echo shell-ok'

    install.sh detects the OS (darwin or linux) and then, in order:

    1. Makes sure git, stow and curl exist, bootstrapping Homebrew on macOS or using apt-get on Debian. Stow is the only hard requirement.
    2. Installs optional tools: zsh, tmux, Neovim 0.11 (pinned, because 0.12 breaks nvim-treesitter master), lazygit, ripgrep, jq, gpg, pass and a C toolchain. On Debian it also installs __scripts__/debian-packages.txt.
    3. Stows every package from __scripts__/stow-map.sh. The macOS desktop packages are stowed only on darwin. A failed package is recorded and the loop carries on.
    4. On macOS, renders the LaunchAgent templates for SketchyBar, JankyBorders and the ssh agent, and merges the Karabiner rules.
    5. Runs each local plugin’s own install.sh, sets up tmux plugins through tpm, installs the git hooks, then mise install.

    Every step checks before acting, so running it twice is safe. Each one can be switched off with an environment variable (DOTFILES_SKIP_OPTIONAL_TOOLS, DOTFILES_STOW_ADOPT and so on).

    Tooling

    LayerToolNotes
    WMAeroSpacei3-style tiling for macOS
    Status barSketchyBarstarted by a LaunchAgent
    Window borderJankyBordersfocus indicator, turns red while the browser prefix is armed
    KeyboardKarabiner-ElementsHome works as a tmux-style prefix in Chrome and Brave too
    TerminalGhostty / Alacrittyfont and window only, no shell or tmux wiring
    Multiplexertmuxprefix is Home, plugins through tpm
    ShellZshalias files per topic, local modules sourced if present
    EditorNeovimLua config under nvim/lua/arisjirat/, lazy.nvim
    File managerYazi / JoshutoTUI
    Version managermiseinstalled from mise.run if missing
    Secretspass + sandiresolved per process, never written to disk

    The Home key, everywhere

    The tmux prefix is Home, because on my keyboard Home sits under the right thumb. The repo now carries that into the browser: karabiner/tmux-browser.json makes Home arm a prefix layer in Chrome and Brave, so the same grammar works in both places. While the prefix is armed, SketchyBar shows PREFIX and the window border turns red. It falls back to idle after 2000 ms.

    Secrets

    There is deliberately no ~/.secrets file. Secrets live in pass, and sandi env VAR=entry -- cmd resolves them into the one process that needs them. docs/secrets.md gives the reason: a plaintext dump sourced by every shell undoes the encryption, and it silently held empty values whenever a decrypt failed. A pre-commit hook runs __scripts__/scan_secrets.sh on what is staged, because by push time a secret is already in the history.

    Brewfile

    Brewfile is the package manifest, tracked in git so installs are reproducible:

    tap "felixkratz/formulae"     # sketchybar, borders
    tap "nikitabobko/tap"         # aerospace
    
    brew "neovim"
    brew "tmux"
    brew "stow"
    brew "pass"
    ...
    
    cask "aerospace"
    cask "hammerspoon"
    cask "karabiner-elements"
    ...

    install.sh does not apply it; brew bundle is a separate, deliberate step. On Debian, __scripts__/brew-leaves.txt (exported on the Mac) is mapped to apt equivalents instead.

    Update Workflow

    Config edits are live immediately, because the files are symlinks:

    nvim ~/dotfiles/nvim/lua/arisjirat/core/keymaps.lua
    cd ~/dotfiles && git add -p && git commit && git push

    On another machine, git pull is enough. The post-merge hook runs __scripts__/dots-sync.sh, which re-stows, merges the Karabiner rules, updates tmux plugins, reloads a running tmux and pulls the zsh plugins and local plugins. CI runs shellcheck on every script.

    Status

    Active repo, used daily, changed whenever a tool comes in or goes out. Recent removals: the opencode config and the herdr integration.

    id en
    rss gh in