Skip to content
المشاريع

حول

Cross-platform dotfiles shared by macOS and Linux (native and WSL2)

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
؜-١
خلال 7 أيام
؜-١
خلال 15 يومًا
؜-١
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

My dot files

Say Thanks!

These are my config files for Bash, VIM, Python, tmux and more. Also includes a handful of utility scripts and quite a lot of aliases/functions I find useful and re-use quite often.

I have made the repo public as a source of inspiration for others, not as a general base for everyone to contribute to. This setup works for me. You do you!

This repo is under a do as you please license :)

Intentionally simple

I really hate code or configuration that I don't understand. It might do magical things, but when things ago awry, and they do, I need to be able to fix it. In this setup, I have handwritten (or at least hand copied :smiley:) every line, and I have tried to document (commit msg or inline comment) why the line exists if it is scary or weird in some way. I encourage you to read the various setup files to understand how it works and prod around yourself :)

Supports per machine/os settings

Which programs to install and how is of course unique to every operating system. This setup supports this quite fine, so I can get my tools, no matter if macOS or WSL2.

See per-host-config/README.md

OS independant utils (macOS and Linux friendly)

Some of the common utilities uses environment switches to handle BSD vs GNU issues and such automatically. Examples of this are util.esed and util.size. This way I can use these utils to get (mostly) platform independant scripts :)

Installation

WARNING

This repo and its configs includes my settings, which means that if you run the ./setup.sh script, it will overwrite your existing configuration files. I have taken steps to ensure that any personal settings involving names are not re-used (was causing issues), so your Git committer info will be safe :)

Steps

git clone https://github.com/fatso83/dotfiles
./dotfiles/setup.sh # and wait until completion ...

install vid

The first time you run the install it will take some time, though this only takes a lot of time the first time you run setup. On subsequent ./setup.sh runs, it should be over in a handful of seconds.

Chezmoi migration

Chezmoi now owns the common configuration, runtime links, host configuration, mac-work mise module and mac-specific configuration links. Package installation, plugin downloads, compiled utilities and OS settings remain provisioning steps.

Use scripts/apply-chezmoi.sh for configuration only; it reads ~/.dotfiles-machine, or accepts the machine profile as its argument. Run ./setup.sh for the full installation, including packages and plugins. The helpers use this checkout and isolated chezmoi configuration/state, and stop instead of overwriting differing local files. Backups have a .pre-chezmoi suffix; last-applied state is in ${XDG_STATE_HOME:-~/.local/state}/dotfiles. Do not delete this state to bypass a conflict.

Git identity stays local. Existing ~/.gitconfig-personal and ~/.secret are preserved. Optional 1Password bootstrap needs your actual field reference and an authenticated op; no credentials or vault references are stored in Git. Secret files must never be included in shared diffs or logs.

Repository symlinks remain live: pulling Git changes their contents before any apply. The migration is not an atomic rollout. Do not run unattended chezmoi update; follow the update procedure.

Details and boundaries:

Run the isolated regression suite with CHEZMOI_BIN=/path/to/chezmoi scripts/test-chezmoi.sh. Tests use temporary home directories and fake secrets. They do not certify real 1Password authentication or execute package/system provisioning on other hosts.

Tool versions (mise)

Node, Python, Ruby, Bun, Starship, just and the global CLIs (prettier, eslint, poetry, gist, ...) are managed by mise, which replaced asdf and Volta. The global set lives in common-setup/mise/config.toml, symlinked to ~/.config/mise/config.toml. Projects override it with their own .tool-versions or mise.toml, as before.

  • To change a global version: edit common-setup/mise/config.toml and run mise install. Never use mise use -g, as it rewrites the repo file behind the symlink.
  • Something off? mise doctor first, then DEBUG=1 bash -i to see the init order. Mise must be the last thing touching PATH in bashrc.
  • restore_path resets PATH to the login snapshot, which only has the mise shims. The real mise bin dirs come back at the next prompt.
  • zsh completion is a one-off: mise completion zsh > ~/.zfunc/_mise
  • direnv is still hooked in, before mise. The mise docs say running both together is unsupported, as their hooks can disagree about PATH. It works for me for now; replacing direnv with mise [env] is the next step.

Background and decisions: docs/plans/2026-10-22-mise-common-setup.md

Debugging

bash.rc related shell issues

For debugging an issue after installing, the first thing is to uncomment the line in ~/.bashrc that says "# DEBUG=1". This will print out lots of debugging info. The second thing to do, once you now approximately where things go wrong is to add set -x (print lots of debugging info on commands executing) and set -e (exit on first error - should mostly already be set)l

sourced files

If you encounter an issue in a sourced file, it might be a bit difficult to debug if they contain exit 1 or calls to the error util. Just do this instead:

bash -c "ROOT=$PWD source ./shared.lib"

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…