Skip to content

ZachiNachshon/dotfiles-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

RequirementsOverviewSupportLicense


An example of a dotfiles repository used for a local development environment. This repository is curated and managed via dotfiles-cli utility which simplifies the complex dotfiles repository wiring by separating the files from the management layer, allowing to consolidate and manage dotfiles, settings and perferences in a single place backed by a remote git repository.


🏁 Requirements

  • A Unix-like operating system: macOS, Linux
  • git (recommended v2.30.0 or higher)
  • dotfiles-cli (download)

🔍 Overview


Dotfiles Repo Structure

This is the expected dotfiles repository structure to properly integrate with dotfiles-cli:

.
├── ...
├── brew                     # Homebrew components, items on each file should be separated by a new line
│   ├── casks.txt
│   ├── drivers.txt
│   ├── packages.txt
│   ├── services.txt
│   └── taps.txt
│
├── dotfiles               
│   ├── custom               # Custom files to source on every new shell session (work/personal)
│   │   ├── .my-company  
│   │   └── ...
│   ├── home                 # Files to symlink into HOME folder
│   │   ├── .gitconfig       
│   │   ├── .vimrc
│   │   └── ...
│   ├── session              # Files to source on new shell sessions
│   │   ├── .aliases
│   │   └── ...
│   ├── shell                # Shell run commands files to symlink into HOME folder
│   │   ├── .zshrc
│   │   └── ...
│   └── transient            # Files to source on new shell session (not symlinked, can be git-ignored)
│       └── .secrets
│
├── os
│   ├── linux                # Scripts to configure Linux settings and preferences
│   │   ├── key_bindings.sh
│   │   └── ...
│   └── mac                  # Scripts to configure macOS settings and preferences
│       ├── finder.sh  
│       └── ...
│
├── plugins
│   ├── zsh                  # Scripts to install ZSH plugins
│   │   ├── oh_my_zsh.sh  
│   │   └── ...
│   └── bash                 # Scripts to install Bash plugins
│       ├── dummy.sh
│       └── ...
└── ...
💡 Note
For detailed information about the dotfiles repo structure, please read here.

brew

Declare which Homebrew components to install by type, the brew folder holds the Homebrew components declarations, items on each file should be separated by a new line.

Usage:

dotfiles brew <packages/casks/drivers/services/all>

dotfiles

Sync or unsync symlinks from the dotfiles repository and control what to source on an active shell session.

Usage:

dotfiles sync <home/shell/all>
Domain Description
home The dotfiles folder contains files to symlink from the repository to the $HOME folder, an unsync command is available to remove them when necessary.
custom Session based content such as to get sourced on specific machines e.g. work related / personal
session Session based content such as exports, aliases, functions to get sourced across all machines on every new shell session.
shell Those are shell RC files that get symlinked into the $HOME folder accoridng to the active shell in use (zsh/bash), usually files that are being sourced on every new shell session.
transient If files in the transient folder exists, they will be sourced along but won't get symlinked anywhere. You can use this to export ENV VARs with sensitive information such as secrets to become available on any newly opened shells. Files under transient folder are git ignored by default to prevent from committing to a public repository.
⚠️ Warning
It is not recommended to commit the .secrets transient file as it may contain sensitive information.

os

Update OS settings and preferences, the os folder contains scripts that configure the presonal settings and preferences for mac / linux operating systems.

Usage:

dotfiles os <linux/mac>

plugins

Install plugins by shell type, the plugins folder contains scripts to run on a specific shell type.

Usage:

dotfiles plugins <bash/zsh>

📖 Documentation

Please refer to the documentation for detailed explanation on how to configure and use dotfiles-cli.


❤️ Support

dotfiles-example is an open source project that is currently self maintained in addition to my day job, you are welcome to show your appreciation by sending me cups of coffee using the the following link as it is a known fact that it is the fuel that drives software engineering ☕

Buy Me A Coffee


License

MIT


Credits: Logo created by Joel Glovier