# fedora-dots — personal dot-files My user configuration, tracked with a **bare git repo** so files stay exactly where they are — nothing is copied, moved, or symlinked. Repo storage: `~/.cfg.git` (hidden) · Work tree: `$HOME` · Alias: `cfg` ``` laptop Gitea VM / fresh install ~/.cfg.git ──cfg push──► fedora-dots ◄──cfg pull── ~/.cfg.git ▲ │ └────────────── your real files (~/.config/…) ◄──cfg checkout────────┘ ``` ## Current contents - `.config/niri/` — compositor config - `.config/noctalia/` — shell config (colors, plugins, settings) ## The alias (required once per machine) ```bash alias cfg='git --git-dir=$HOME/.cfg.git --work-tree=$HOME' ``` Put it in `~/.bashrc` (or your shell's equivalent) to make it permanent. ## New machine setup (two ways) **Automatic** — the [fedora](https://git.ku-it.org/yuri/fedora) setup script asks *"Clone personal dotfiles?"* (or use `--dotfiles=yes`). It does a bare clone into `~/.cfg.git`, checks everything out into `$HOME`, and sets `status.showUntrackedFiles no`. Nothing manual needed. **Manual:** ```bash git clone --bare gitea@git.ku-it.org:yuri/fedora-dots.git ~/.cfg.git # --bare matters! cfg config status.showUntrackedFiles no cfg checkout ``` (`checkout` may need `-f` if stock files are in the way — that overwrites them with the repo versions, which is the point on a fresh machine.) ## Daily workflow | What | Where | Commands | |---|---|---| | **Changed a tracked file** | the machine you edited it on | `cfg add ` → `cfg commit -m "…"` → `cfg push` | | **Sync latest onto another machine** | VM / other box | `cfg pull` | | **See what changed / is unsynced** | anywhere | `cfg status` | | **Take Gitea's version, discard local edits** | VM | `cfg checkout -f` (careful) | ### Adding a new folder (opt-in, one at a time) ```bash cfg add ~/.config/alacritty # any path under $HOME cfg commit -m "alacritty" cfg push ``` Nothing is tracked until you name it. `status.showUntrackedFiles no` keeps `cfg status` quiet about everything else. ### Good next candidates `~/.bashrc` · `~/.config/alacritty/` · `~/.config/fuzzel/` · `~/.gitconfig` (**strip credentials first** — a secret pushed is a secret exposed, private Gitea or not) ## Rules of the road 1. **Edit + push from the machine where you maintain it** (the laptop); `cfg pull` on consumers. 2. **Do NOT edit files through Gitea's web GUI** — that changes only the server copy; your next push silently overwrites it. Web is for reading. 3. **`cfg status` clean = everything synced.** Run it weekly; drift is the only real risk of this setup. 4. **Never track secrets**: tokens, passwords, `.netrc`, history exports. Keep those out of git entirely. ## Why bare + alias (instead of a normal repo or symlinks) - A normal clone would need its files *inside* the repo folder — but dot-files must live in `$HOME`. The bare repo decouples storage from location. - No symlinks means no tooling surprises and no broken links; files are real files in their real places. - It's plain git — no stow/chezmoi/yadm dependency to install on every machine.