Skip to content

Dotfiles overview (Cowboy)

Michael Lockhart edited this page Mar 12, 2018 · 1 revision

Cowboy dotfiles overview

To summarise the README:

  • the dotfiles project contains personal preferences for the Unix programs that I use and wish to keep synchronised across all the computers (real or virtual) for which I have a $USER

  • The bones of dotfiles is a Bash script called dotfiles which orchestrates:

    • cloning and pulling the latest configurations from the dotfiles master repository on github
    • placing configuration files ("dot files") into locations within $HOME, backing up whatever was there to begin (the copy and link steps)
    • initialising the environment by installing wanted software packages that use the configurations (the init step)
  • These are the intentions:

    1. keep configurations consistent between computers
    2. support the different Unix systems that I frequently use
    3. from a standard installation base, expand the host operating system to include the software I consider to be most vital for a particular Unix environment
    4. separate policy (my own preferences) from mechanism (the dotfiles bash script itself and supporting utility scripts and functions)

link step

Files in $DOTFILES/link/ are symbolically linked to $HOME. Then if you edit files in $HOME or pull the dotfiles repository; the effect is to keep the local system settings in sync with the repository. Most configuration files tracked by dotfiles should be of this sort, but private/sensitive files MUST NOT be linked (or you will leak the private details to your public GitHub repository).

copy step

Files in $DOTFILES/copy/ are copied to $HOME verbatim; they are not linked. This means changes made in the $HOME copy are not reflected within the $DOTFILES working copy and will not be noticed by git.

Cowboy's intention is that this will prevent unintended committing of sensitive/private data to the public repository at GitHub. Instead these files should be edited once copied.

My own opinion is that this step should be replaced by a mechanism to retrieve/sync private files (such as SSH configuration or keys) from/with a private storage.

init step

dotfiles will install and/or initialise environments and software using the scripts in $DOTFILES/init. They are processed in alphanumeric order so you can use this for precident/requirements resolution. They are also optionally named with a target operating system so that dotfiles is able to automatically select appropriate initialisations for the present platform.

other directories

backups

Any files that dotfiles would overwrite in the link or copy steps are copied here for safe keeping.

bin

Useful scripts and cross-platform binaries. This is added to $PATH.

caches

Utility cache files (e.g. dotfiles selected initialisation scripts). Ignored by the dotfiles project git configuration.

conf

Miscellaneous configuration used by other parts of dotfiles (e.g. custom fonts).

source

Files sourced by $HOME/.bashrc when the bash shell starts. Good place for shell aliases and functions. The files are sourced in alphanumeric order to effect dependencies, and SHOULD be grouped by purpose.

test

dotfiles test modules.

vendor

dotfiles sub-modules are cloned here.