Skip to content

pnodet/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Prerequisites

Install Xcode Command Line Tools

xcode-select --install
sudo xcodebuild -license accept

Install Rosetta 2 (Apple Silicon Macs only)

softwareupdate --install-rosetta --agree-to-license

Install Nix

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)

Enable Nix flakes and nix-command

sudo mkdir -p /etc/nix
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf

Setup

Clone the repository

git clone https://github.com/pnodet/dotfiles.git ~/.dotfiles

Bootstrap Nix Darwin (first time only)

For M4 MacBook Pro:

sudo nix run nix-darwin -- switch --flake ".dotfiles#pnodet-mbp-m4"

For M1 MacBook Pro (home server):

sudo nix run nix-darwin -- switch --flake ".dotfiles#pnodet-mbp-m1"

Subsequent updates (after bootstrap)

# For M4 MacBook Pro
sudo darwin-rebuild switch --flake ".dotfiles#pnodet-mbp-m4"

# For M1 MacBook Pro
sudo darwin-rebuild switch --flake ".dotfiles#pnodet-mbp-m1"

Post-Setup

Install zsh4humans and setup shell configuration

Install zsh4humans:

if command -v curl >/dev/null 2>&1; then
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
else
  sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
fi

Symlink the zshrc configuration:

ln -sf ~/.dotfiles/.zshrc ~/.zshrc

Reload your shell:

exec zsh

About

my macOS quick install script

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published