Collection of dotfiles
  • Lua 79%
  • Shell 21%
Find a file
Felix a76a5b7a3d Update clone URLs to the new forge
Repo moved from sourcehut to git.ghostze.ro.
2026-08-28 16:07:10 +02:00
.config Sync local config drift 2026-08-28 15:45:48 +02:00
.local/bin Sync local config drift 2026-08-28 15:45:48 +02:00
.newsboat Update: macro to open videos with mpv in newsboat 2023-07-29 19:24:53 +02:00
.nbrc Sync local config drift 2026-08-28 15:45:48 +02:00
.tmux.conf Update: ncspot, nvim and tmux configs. 2023-07-20 22:21:26 +02:00
LICENSE Add: readme and license 2023-06-22 11:21:58 +02:00
README.md Update clone URLs to the new forge 2026-08-28 16:07:10 +02:00

Dotfiles

A very simple dotfiles setup - no special tools, just git and zsh.

Inspired by this HN post.

Initial Setup

# create the .dotfiles repository
git init --bare $HOME/.dotfiles

# add an alias to manage the dotfiles
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc

# reload zsh so the alias is available
source ~/.zshrc

# set git status to hide untracked files
dotfiles config --local status.showUntrackedFiles no

# add the remote
dotfiles remote add origin git@git.ghostze.ro:felixdv/dotfiles.git

Usage

# dotfiles status
dotfiles status

# add files and commit
dotfiles add .config/nvim/init.lua
dotfiles add .config/nvim/lua
dotfiles commit -m "Add vim config"

# push changes to remote
dotfiles push

New Computer Setup

A normal git clone will fail if your home directory isn't empty. To get around that, clone the repo's working directory into a temporary directory first and then delete that directory:

# clone your dotfiles from the remote
git clone --separate-git-dir=$HOME/.dotfiles git@git.ghostze.ro:felixdv/dotfiles.git $HOME/dotfiles-tmp

# remove the temporary directory
rm -r ~/dotfiles-tmp/

# set up the alias again
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc