https://github.com/zeikar/dotfiles
🛠️ My macOS dotfiles managed with GNU Stow.
https://github.com/zeikar/dotfiles
dotfiles mac macos macos-dotfiles macos-setup stow zsh
Last synced: 3 months ago
JSON representation
🛠️ My macOS dotfiles managed with GNU Stow.
- Host: GitHub
- URL: https://github.com/zeikar/dotfiles
- Owner: zeikar
- License: mit
- Created: 2025-02-06T11:54:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-06T13:17:20.000Z (over 1 year ago)
- Last Synced: 2025-02-06T13:43:34.909Z (over 1 year ago)
- Topics: dotfiles, mac, macos, macos-dotfiles, macos-setup, stow, zsh
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My macOS Dotfiles
Minimal macOS dotfiles managed with GNU Stow.
## What is tracked
- `zsh/` for shell configuration
- `Brewfile` for package reproducibility
- `macos-defaults.sh` for common macOS preferences
Machine-specific secrets stay outside the repo:
- `~/.zshrc.local`
## Prerequisites
Required:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install stow
```
Optional but recommended:
```bash
brew bundle --file Brewfile
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
The shell config is defensive now, so missing optional tools will not break shell startup.
## Install
```bash
./install.sh
source ~/.zshrc
```
What `install.sh` does:
- stows tracked packages into `$HOME`
- detects recursive conflicts before linking
- backs up replaced files to `~/.dotfiles-backups//`
- creates `~/.zshrc.local` when missing
## Restore packages
Install packages from the tracked Homebrew bundle:
```bash
brew bundle --file Brewfile
```
## Apply macOS preferences
Review the script first, then run it manually if you want those defaults:
```bash
chmod +x macos-defaults.sh
./macos-defaults.sh
```
## Local-only files
Example `~/.zshrc.local`:
```bash
export GITHUB_TOKEN="your_token_here"
export OPENAI_API_KEY="your_key_here"
```
## Structure
```text
dotfiles/
├── Brewfile
├── install.sh
├── macos-defaults.sh
├── zsh/
│ ├── .zshrc
│ └── .zshrc.local.example
└── README.md
```