skip to content
sys.name
vvhybe_os 26.10
status
200 building papyrus
user
vvhybe (yassine bouba)

cat dome.sh

07 / 19

dome

A minimalist dotfiles manager in Bash: your $HOME, linked to a git repo, per distro.

role
author
year
2025
access
-rwxr-xr-x (open source)

TL;DR

problem
I keep my Linux setup in git, but a .bashrc on Arch isn't the one on Debian, and copying files back and forth drifts.
approach
One Bash script: link the repo into $HOME, map files per distro in YAML, run hooks around each sync, back up whatever it replaces.
outcome
v2.0.0, "star-dust", runs my own Hyprland, Neovim, kitty and waybar setup.

// overview

It links each file from the repo into $HOME, so the file you edit is the file git tracks. Files map per distro in YAML, hooks run before and after a sync, and whatever it would replace is backed up per distro first, ready for dome revert.

It manages my own Hyprland setup. v2.0.0 shipped as star-dust.

// v1 copied, v2 links

The first version built a merged copy of the repo with rsync, synced it both ways and opened meld on conflicts. It worked, with a lot of machinery for one person's files.

v2 dropped rsync for symlinks: the file in $HOME is the file in the repo, so there's nothing left to reconcile.

// one repo, every distro

distro_files maps a name to its variants: .bashrc becomes .bashrc.arch on Arch and .bashrc.debian on Debian, picked at sync time from /etc/os-release.

// the VERSION bug

Reading /etc/os-release on Ubuntu quietly overwrote the script's own VERSION, because that file sets one too. Renaming it DOME_VERSION fixed it. Sourcing a system file into your own namespace is a lesson you learn once.

// backups first

Before it replaces a file, dome copies it into a timestamped backup per distro. -n skips that, -v prints what happened, and dome revert puts it all back. It's tested with Bats.

// stack

  • bash
  • git
  • yaml

// links