Skip to content

Stuff to make it more convenient to configure and update my computers.

License

Notifications You must be signed in to change notification settings

johnjeffers/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Stuff to make it more convenient to configure and update my computers.

Warning

This is written for my personal needs. The software and config files it installs are unlikely to be exactly what you want or need. It might be a good place to get ideas for your own setup scripts, though.

This has only been tested on MacOS. Some of this might work on Linux or Windows, but I don't know.

How to Use This Repo

  1. Install Xcode Command Line Tools. This installs git
    xcode-select --install
  2. Clone this repo
    git clone https://github.com/johnjeffers/dotfiles.git
  3. cd into the directory where you cloned the repo and run ./setup.sh --all

How it Works

The script installs and configures software automatically, so I don't have to do it manually. It handles configuration primarily with symlinks to files saved in this repo, and installs and updates software using brew.

Git Configuration

By default, the script creates directories and .gitconfig files under $HOME that will look something like this:

$HOME
├─ .gitconfig  <-- global .gitconfig
└─ git
   ├─ personal/
   ├─ public/
      └─ .gitconfig  <-- public-specific .gitconfig
   └─ company-name/
      └─ .gitconfig  <-- work-specific .gitconfig

Each .gitconfig is configured with name and email, so you can use different personas for personal, public, and work repos as necessary.

The actual directory locations can be overridden, and the script will prompt you to confirm or change those locations on its initial run.

Dotfile Symlinks

The script will create symlinks to dotfiles that configure various programs. Currently, this includes:

  • ~/.aws/config
  • ~/.config/starship.toml
  • ~/.bashrc
  • ~/.bash_profile
  • ~/.zprofile
  • ~/.zshrc

If any of these files already exist, the script will make a backup.

Other Configuration

Install Software with Brew

After config files are created, the script installs the software in the brewfiles.

The brewfiles are split into categories. The minimal brewfile is always installed, while the others are conditional based on answers to the setup script questions.

Software Updates

One of the aliases in the .zshrc file allows you to run the setup script from any directory.

alias swup='$HOME/git/personal/dotfiles/setup.sh'

Run swup regularly to update everything that was installed by the script.

Note

One exception to the "update all the things via script" dream is software that was installed via brew cask. Cask updates have problematic in my experience, and I had enough issues to give up on it. Apps installed by cask should be updated via their standard (usually in-app) update methods.

If you'd like to try letting cask update the apps, find the brew cu --cleanup line in the script and change it to brew cu --all.

About

Stuff to make it more convenient to configure and update my computers.

Resources

License

Stars

Watchers

Forks

Languages