Personal dotfiles for better host management and more fun!
The MIT license is used here, see LICENSE.
Development is always ongoing. Changes will be made when I need them.
Aaahm… Well… Nope.
It expects one to manage the repository as packages using GNU stow:
$ stow --target $target_dir --dotfiles $package_list
# simulate
$ stow --target $HOME --verbose common git linux vim zsh --dotfiles --simulate
…
LINK: .screenrc => Repositories/Private/dotfiles/screen/.screenrc
LINK: .vimrc => Repositories/Private/dotfiles/vim/.vimrc
WARNING: in simulation mode so not modifying filesystem.Most files are prefixed by numbers and managed the same way linux does with /etc/profile and /etc/profile.d:
- the files are listed the default globbing behaviour in shells is to list files alphabetically
- the files are sourced from the list above in FIFO style
$ tree -a zsh
zsh
├── .zshrc.d
│ ├── 00-home.env
│ ├── …
│ ├── 70-gcp-prompt.zsh
│ └── gitlab.zsh
├── .zshenv
└── .zshrc
$ cat zsh/.zshrc
…
for module in ${zsh_modules_dir}/*
do
[[ -r ${module} ]] && source "${module}"
done
unset module
…To achieve the expected result:
-
environment variables should use default values, and override them only when needed:
antigen theme ${ANTIGEN_THEME:-gentoo} -
the files' numbered prefix should follow a structured priority:
- generic environment customizations (personal, work, …)
- os-related overlays and customizations (darwin, linux, …)
- package managers customizations (
brew, macports, …) - frameworks configuration and activation (
antigen,zplug, …) - shell customization (
bash,zsh, …) - app overlays (
git,minikube, …) - aliases and functions
- prompt customization
This should ensure nice, subsequent overrides of variable values and settings.
I personally suggest to keep all shared resources in one place putting them under the ${package}/.local/share/${package} folder and sourcing them inside a package's files:
$ tree -a zsh/.local/share/zsh
zsh/.local/share/zsh
└── zplug
└── init.zsh
2 directories, 1 files
$ cat zsh/zshrc.d/zplug/9-init
source ${ZPLUG_HOME:-~/.local/share/zsh/zplug}/init.zshThis repository is not open for contributions, but I might accept suggestions. Please use the repository's hosting platform's tools for this.