This repository contains my personal nix-darwin setup for managing macOS system settings, packages, and applications declaratively using Nix, using ryan4yin/nix-darwin-kickstarter as a foundation.
.
├── flake.nix # Main flake configuration
├── flake.lock # Flake dependency lock file
├── Makefile # Build commands
├── modules/ # System-level modules
│ ├── nix-core.nix # Nix daemon and flake settings
│ ├── system.nix # macOS system preferences
│ ├── apps.nix # Homebrew and system packages
│ └── host-users.nix # Host and user configuration
├── home/ # User-level home-manager modules
│ ├── default.nix # Home-manager entry point
│ ├── core.nix # Core packages and programs
│ ├── git.nix # Git configuration
│ ├── shell.nix # Zsh shell configuration
│ └── tmux.conf # Tmux configuration
└── scripts/ # Helper scripts
├── brew_no_quarantine.sh # Remove quarantine from Chromium
├── alacritty_theme_monitor.sh # Monitor system appearance changes
└── alacritty_theme_switcher.sh # Switch Alacritty theme
Follow the installation instructions from the official nix-darwin repository.
# Clone to a location of your choice
git clone https://github.com/jp-roisin/nix-darwin ~/etc/nix-darwin
cd ~/etc/nix-darwinEdit flake.nix and update these values:
username = "jp"; # Change to your username
useremail = "your-email@example.com"; # Change to your email
hostname = "macbook"; # Change if desiredsudo make buildThis command will:
- Build the nix-darwin configuration
- Switch to the new configuration
- Install Homebrew packages and applications
- Apply system settings
- Remove quarantine from Chromium
Note: The first build will take 15-30 minutes as it downloads and installs everything.
sudo shutdown -r nowTODO: Document what's automatically configured after installation
Development Tools & Credentials
-
SSH Keys
- Generate new SSH key:
ssh-keygen -t ed25519 -C "your-email@example.com" - Add to ssh-agent:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519 - Add public key to GitHub/GitLab/Bitbucket
- Generate new SSH key:
-
GPG Keys
- Import GPG keys for git commit signing
- Configure git:
git config --global user.signingkey <key-id> - Configure git:
git config --global commit.gpgsign true
-
GitHub CLI
- Install:
brew install gh - Authenticate:
gh auth login
- Install:
-
Mise
- Configure Node.js:
mise use --global node@lts - Configure Python:
mise use --global python@latest - Install other runtimes as needed
- Configure Node.js:
-
PostgreSQL
- Start service:
brew services start postgresql@17 - Create database user if needed
- Start service:
-
Redis
- Start service:
brew services start redis
- Start service:
-
Docker
- Sign in to Docker Hub
- Configure Docker resources (Settings → Resources)
-
IDE Configuration
- WebStorm: Sign in to JetBrains account, sync settings
- VS Code: Sign in to sync settings and extensions
- Configure language server settings
-
API Keys & Environment Variables
- Create
~/.zshenvor~/.envfor sensitive variables - Add API keys for services you use
- Create
Terminal & Shell
-
Alacritty
- Install themes:
mkdir -p ~/.config/alacritty/themes && git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes - Verify theme auto-switching works (change system appearance)
- Install themes:
-
Tmux
- Install TPM (Tmux Plugin Manager):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - Install plugins: Open tmux, press
Ctrl-Space + I
- Install TPM (Tmux Plugin Manager):
-
Zsh
- Verify autojump works:
j <directory>after visiting directories - Add any custom aliases to
home/shell.nix
- Verify autojump works:
-
Neovim
- Install your preferred Neovim config (LazyVim, NvChad, etc.)
- Or clone your dotfiles:
git clone <your-nvim-config> ~/.config/nvim
Communication & Social
-
Signal
- Link to phone
-
WhatsApp
- Scan QR code to link
-
Discord
- Sign in to account
-
Microsoft Teams
- Sign in with work account
Productivity
-
Alfred
- Purchase/enter Powerpack license
- Configure hotkey (default: Cmd+Space, may need to disable Spotlight)
- Sync preferences if using cloud storage
- Install workflows
-
Logseq
- Choose graph location
- Configure sync (iCloud, Syncthing, etc.)
-
Anki
- Sign in to AnkiWeb
- Sync decks
Media & Entertainment
-
Spotify
- Sign in to account
- Download offline playlists if needed
-
Jellyfin Media Player
- Connect to Jellyfin server
Utilities & System
-
Tailscale
- Sign in and connect to network
-
Stats
- Configure menu bar widgets
- Grant necessary permissions
-
AeroSpace
- Configure keybindings:
~/.aerospace.toml - Grant Accessibility permissions (System Settings → Privacy & Security → Accessibility)
- Configure keybindings:
-
Borders (FelixKratz)
- Start service:
brew services start borders - Configure if needed
- Start service:
macOS Settings Not Managed by Nix
-
System Settings → Privacy & Security
- Grant Full Disk Access to Terminal/Alacritty
- Grant Accessibility access to AeroSpace
- Review and configure other app permissions
-
System Settings → Keyboard
- Configure additional keyboard shortcuts if needed
- Set up text replacements
-
System Settings → Desktop & Dock
- Add/remove apps from Dock
- Configure Hot Corners if desired
-
System Settings → Displays
- Arrange multiple displays
- Set resolution/scaling preferences
-
System Settings → Trackpad
- Verify tap to click is enabled
- Adjust tracking speed
-
System Settings → Sound
- Configure input/output devices
- Adjust alert volume
-
System Settings → Sharing
- Set Computer Name
- Enable/disable sharing services
-
System Settings → Users & Groups
- Set profile picture
-
Safari (if using)
- Configure default browser
- Import bookmarks
-
Time Machine
- Set up backup disk
- Configure backup schedule
Additional Manual Tasks
- Add your custom tasks here
- [ ]
- [ ]
- [ ]