xcode-select --install
sudo xcodebuild -license accept
softwareupdate --install-rosetta --agree-to-license
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)
sudo mkdir -p /etc/nix
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf
git clone https://github.com/pnodet/dotfiles.git ~/.dotfiles
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"
# 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"
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