https://github.com/pnodet/dotfiles
my macOS quick install script
https://github.com/pnodet/dotfiles
dotfiles macos macos-setup
Last synced: about 2 months ago
JSON representation
my macOS quick install script
- Host: GitHub
- URL: https://github.com/pnodet/dotfiles
- Owner: pnodet
- License: mit
- Created: 2021-02-09T13:42:07.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-25T05:12:51.000Z (over 2 years ago)
- Last Synced: 2025-02-28T14:06:05.301Z (over 1 year ago)
- Topics: dotfiles, macos, macos-setup
- Language: Shell
- Homepage:
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotfiles
## Prerequisites
### Install Xcode Command Line Tools
```sh
xcode-select --install
sudo xcodebuild -license accept
```
### Install Rosetta 2 (Apple Silicon Macs only)
```sh
softwareupdate --install-rosetta --agree-to-license
```
### Install Nix
```sh
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)
```
### Enable Nix flakes and nix-command
```sh
sudo mkdir -p /etc/nix
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf
```
## Setup
### Clone the repository
```sh
git clone https://github.com/pnodet/dotfiles.git ~/.dotfiles
```
### Bootstrap Nix Darwin (first time only)
For M4 MacBook Pro:
```sh
sudo nix run nix-darwin -- switch --flake ".dotfiles#pnodet-mbp-m4"
```
For M1 MacBook Pro (home server):
```sh
sudo nix run nix-darwin -- switch --flake ".dotfiles#pnodet-mbp-m1"
```
### Subsequent updates (after bootstrap)
```sh
# 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:
```sh
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:
```sh
ln -sf ~/.dotfiles/.zshrc ~/.zshrc
```
Reload your shell:
```sh
exec zsh
```