Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Personal dotfiles. XDG-based, symlinked by a dependency-free POSIX installer.

Layout

Repo path Symlinked to
git/ ${XDG_CONFIG_HOME:-~/.config}/git
nvim/ ${XDG_CONFIG_HOME:-~/.config}/nvim
tmux/ ${XDG_CONFIG_HOME:-~/.config}/tmux

Requirements

  • git >= 2.38 (rebase.updateRefs, merge.conflictstyle = zdiff3, includeIf "gitdir:")
  • tmux >= 3.1 (reads $XDG_CONFIG_HOME/tmux/tmux.conf)
  • Neovim >= 0.12 (vim.pack, vim.hl)
  • pacman, apt-get or dnf for package installation (or skip with --no-packages)

Quickstart

git clone <repo-url> ~/dotfiles
cd ~/dotfiles
./install.sh

Clone location matters: the generated git/config keys per-directory identity off includeIf "gitdir:" for the clone itself and <workspaces-root>/<identity>/.

The installer is idempotent. Re-running skips links that are already correct; anything else occupying a target path is first moved to <path>.bak.<timestamp>.

What install.sh does

  1. Installs curl git neovim tmux ripgrep fzf via pacman, apt-get or dnf (--no-packages to skip).
  2. Symlinks git/, nvim/, tmux/ into $XDG_CONFIG_HOME.
  3. Generates the per-machine git/config (gitignored): the base include plus includeIf "gitdir:" routing for the identities selected via --identities (or an interactive prompt). --workspaces-root sets the root those identities are keyed under. Never overwrites an existing git/config.
  4. If gh is installed and logged in, runs gh auth setup-git so git uses it as the credential helper for https://github.com (and gists). The block is appended to the generated git/config via GIT_CONFIG_GLOBAL; gh records its own resolved binary path, so re-run if gh moves.
  5. Optionally merges SSH keys from GitHub (opt-in, see below).

Run ./install.sh --help for the full option list.

Environment variables

Variable Default Description
XDG_CONFIG_HOME $HOME/.config Symlink target directory
INSTALL_SSH_KEYS_FROM_GITHUB 0 Set to 1 to merge GitHub keys into authorized_keys
GITHUB_KEYS_USER feepw GitHub user to fetch keys from
SSH_DIR $HOME/.ssh SSH directory for the key merge
GIT_WORKSPACES_ROOT $HOME/Workspaces Root the git identities are keyed under (--workspaces-root)
GIT_IDENTITIES (ask if interactive) Comma-separated git identities to enable (--identities)
NVIM_ENABLED_LANGUAGES lua Comma-separated languages whose LSP servers Neovim installs via mason

The SSH step merges — only keys not already present are appended — and backs up the existing authorized_keys first. It never overwrites the file.

Per-machine git settings

git/config is gitignored and generated by install.sh: it includes git/global and routes per-directory identities via includeIf "gitdir:" for each enabled identity (git/github, git/eom, … — one file per platform). Add a new platform by dropping a git/<identity> file with a [user] block into git/ and re-running the installer on a fresh machine.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages