Skip to content

marcaube/dotfiles

Repository files navigation

My dotfiles

CI

This repo contains my dotfiles, terminal configs, a "manifest" of apps that should be installed on my system and an installation script to make the process of setting up a new computer as seamless as possible.

Before installation

If you have a working computer, make sure you first go through this checklist before reinstalling everything from scratch...

  1. commit and push changes/branches to your git repos
  2. save/backup all important documents from non-iCloud directories
  3. save all your work from apps which aren't synced through iCloud
  4. export important data from your local databases
  5. update mackup to the latest version and run mackup backup (macOS only)

Installation

The ./install script detects the platform (uname) and runs the right combination of configs, so the first four steps are the same everywhere.

macOS

# 1. Update macOS to the latest version with the App Store
sudo softwareupdate -i -a

# 2. Copy your public and private SSH keys to ~/.ssh and make sure they're set to 600
chmod 600 <name_of_the_key>

# 3. Clone this repo to ~/.dotfiles
cd ~; git clone git@github.com:marcaube/dotfiles.git .dotfiles

# 4. Run the install script
cd ~/.dotfiles; ./install; cd -

# 5. Login with your Apple ID, check iCloud Drive and let it sync for a while

# 6. Restore preferences
mackup restore

# 7. Check that homebrew installations are A1
brew doctor

# 8. Restart your computer to finalize the process
shutdown -r now

Debian / Ubuntu Linux

The Apple-specific steps (App Store update, iCloud, mackup) don't apply. ./install installs the apt prerequisites it needs (build tools, zsh, xclip/wl-clipboard, …) and Linuxbrew, then symlinks everything.

# 1. Update the system
sudo apt update && sudo apt upgrade

# 2. Copy your SSH keys to ~/.ssh and make sure they're set to 600
chmod 600 <name_of_the_key>

# 3. Clone this repo to ~/.dotfiles
cd ~; git clone git@github.com:marcaube/dotfiles.git .dotfiles

# 4. Run the install script
cd ~/.dotfiles; ./install; cd -

# 5. Log out and back in so the new login shell (zsh) takes effect

Update

To pull the latest changes from the repo and update your setup.

# 1. Move into the dotfiles directory
dotfiles

# 2. Pull the changes from master
git pull

# 3. Reload the configs
reload

# 4. Restore preferences (macOS only)
mackup restore

Tweaking the setup

To add git credentials, custom commands, or private aliases, you should create a zsh/extra.zsh file. This file is going to be picked up by ZSH but ignored by git. You can use this file to add stuff you don't want to commit to a public repository.

For example, that's where you could define your GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL.

Features

  • cross-platform: works on macOS (Apple Silicon) and Debian/Ubuntu Linux — the ./install wrapper layers an OS-specific Dotbot config on top of a shared one, and the shell config branches at runtime via zsh/lib/os.zsh
  • sensible macos configs, see this repo for more options
  • split Brewfiles: brew/Brewfile.common (cross-platform CLI tools) and brew/Brewfile.darwin (macOS casks + Mac App Store apps), see the caskroom for more
    • binaries are installed with Homebrew (Linuxbrew on Linux)
    • apps are either installed with Homebrew Cask or MAS (macOS only)
  • an aliases.zsh file with a bunch of useful aliases and functions
    • CLI app launchers
    • encoding and crypto utility functions
    • an update alias to update macOS, mac app store apps, Homebrew binaries and Cask apps
    • a weather function to get weather reports from wttr.in
    • and much more...
  • a .zshrc file to tweak my Z shell config
  • most app settings synced with iCloud via Mackup

The files

  • gitconfig is my git configurations
  • gitignore_global is a list of files and extensions that should be globally ignored by git
  • mackup.cfg is the Mackup configuration, to sync app settings using iCloud instead of Dropbox
  • macos.sh contains my macOS preferences
  • zshrc contains my Z shell config (plugins are sourced directly, no Oh My ZSH)
  • aliases.zsh defines a list of useful CLI aliases, shortcuts and functions
  • brew/Brewfile.common and brew/Brewfile.darwin list the binaries (homebrew) and apps (cask and mas) I want installed
  • exports.zsh contains the PATH env variable configs
  • zsh/lib/os.zsh detects the platform and exposes is_macos/is_linux so the rest of the shell config can branch
  • zsh/aliases.darwin.zsh / zsh/aliases.linux.zsh hold the platform-specific aliases (sourced as aliases.${OS}.zsh)
  • zsh/extra.zsh is a file ignored by git where you can add your git credentials, custom commands, private aliases, etc.
  • install is the installation script to make this all work "automagically"
  • install.conf.common.yaml plus install.conf.darwin.yaml / install.conf.linux.yaml are the Dotbot configs
  • init.lua is my Neovim entry point — modular config under vim/lua/, plugins managed by lazy.nvim

Inspired by...

About

My default configs for OSX

Topics

Resources

License

Stars

10 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors