# Personal dotfiles (eg .config) The files here are structured for compatibility with stow. # Targets Each package may have files that target the system or the user file heirarchy. Therefore, each package may have a subdirectory containing any of: * system * user *Example* with dotfiles repo checked out to `./dotfiles` (`DOTFILES_DIR`): ```plain ./dotfiles ├── Readme.md ├── ssh │   ├── system │   │   └── etc │   │   └── ssh │   │   ├── ssh_config │   │   └── sshd_config │   └── user │   └── .ssh │   └── config └── vim └── .vimrc ``` In the case no target subdirectories are present for a given package, then the target is assumed to be the `user` target. More targets may be added in the future: * user-config (`/home/acme/.config`) * user-local (`/home/acme/.local`) * system-opt (`/opt`) * system-local (`/usr/local`) * system-lib (`/usr/local/lib`) For now, to ensure maximum compatibility, it's more flexable to require each package to supply the specific heirarchy. ## User All directories under the user target are relative to `$HOME`. *Example* Stow all `vim` config at `/home/acme/`: ```bash ./dot apply vim ``` On GNU compatible system this is equivalent to: ```bash stow -d "$DOTFILES_DIR" -t "/home/$USER" vim ``` ## System All directories under the system targt are relative to `/`. *Example* Stow system/user `ssh` config at `/home/acme/` and `/` respectively: ```bash ./dot apply ssh ``` On GNU compatible system this is equivalent to: ```bash stow -d "$DOTFILES_DIR/ssh" -t "/home/$USER" user stow -d "$DOTFILES_DIR/ssh" -t / system # needs root permissions obviously ```