The files here are structured for compatibility with stow.
Each package may have files that target the system or the user file heirarchy. Therefore, each package may have a subdirectory containing any of:
Example with dotfiles repo checked out to ./dotfiles
(DOTFILES_DIR
):
./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:
/home/acme/.config
)/home/acme/.local
)/opt
)/usr/local
)/usr/local/lib
)For now, to ensure maximum compatibility, it's more flexable to require each package to supply the specific heirarchy.
All directories under the user target are relative to $HOME
.
Example Stow all vim
config at /home/acme/
:
./dot apply vim
On GNU compatible system this is equivalent to:
stow -d "$DOTFILES_DIR" -t "/home/$USER" vim
All directories under the system targt are relative to /
.
Example Stow system/user ssh
config at /home/acme/
and /
respectively:
./dot apply ssh
On GNU compatible system this is equivalent to:
stow -d "$DOTFILES_DIR/ssh" -t "/home/$USER" user
stow -d "$DOTFILES_DIR/ssh" -t / system # needs root permissions obviously