Reproducible dotfiles using Nix, devenv, and home-manager.
xcode-select --installClick "Install" in the dialog. Wait ~5-10 minutes.
# Generate SSH key
ssh-keygen -t ed25519 -C "testdepth@users.noreply.github.com"
# Start ssh-agent and add key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Copy public key to clipboard
pbcopy < ~/.ssh/id_ed25519.pubAdd key at https://github.com/settings/keys, then verify:
ssh -T git@github.comInstall Nix via the recommended multi-user installation. Open a Terminal (by pressing [Cmd] + [Space] and typing terminal) and run the following command:
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)Restart terminal after installation.
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.confgit clone git@github.com:testdepth/dotfiles.git ~/.dotfiles
cd ~/.dotfilesHome Manager installs direnv, nix-direnv, and the Fish hook (programs.direnv in modules/shell/fish.nix). Do not also install direnv with nix profile install; remove any existing profile copy first: nix profile remove direnv.
applyOr: nix run home-manager -- switch --flake .#macbook
Then trust this repo’s .envrc:
direnv allowWait for devenv to build (~2–5 min first time).
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)Restart terminal to use fish.
Download from https://ghostty.org/download or:
brew install --cask ghosttyLazyVim config is installed automatically via apply. Just run neovim to install plugins:
nvim # Wait for plugins to install, then :qnpm install -g @anthropic-ai/claude-code| Step | Command | Time |
|---|---|---|
| Xcode tools | xcode-select --install |
5-10 min |
| SSH key | ssh-keygen -t ed25519 |
1 min |
| Nix | curl ... | sh |
2-3 min |
| Enable flakes | echo ... > ~/.config/nix/nix.conf |
10 sec |
| Clone | git clone ... ~/.dotfiles |
1 min |
| Apply + direnv | apply then direnv allow |
2-5 min |
| Fish shell | chsh -s $(which fish) |
10 sec |
| Ghostty | Download/brew | 1 min |
| Neovim | nvim (plugins auto-install) |
1 min |
Total: ~20-30 minutes
cd ~/.dotfiles
nix flake update # Update dependencies
apply # Full home-manager switch
apply-nvim # Same as apply (shorthand when you only changed config/nvim/)apply-nvim is on your PATH after a successful apply. Home Manager cannot activate only Neovim; both commands run a full profile switch.
~/.dotfiles/
├── flake.nix # Nix flake entry point
├── flake.lock # Locked dependencies
├── devenv.nix # Development shell
├── home.nix # Base home-manager config
├── .envrc # direnv configuration
│
├── modules/ # Modular configurations
│ ├── shell/fish.nix # Fish shell + bobthefish prompt
│ ├── terminal/ghostty.nix # Ghostty terminal
│ └── git/default.nix # Git configuration
│
├── config/ # Application configs (symlinked via home-manager)
│ └── nvim/ # Neovim (LazyVim)
│
├── hosts/ # Machine-specific configs
│ └── macbook/ # macOS configuration
│
├── scripts/ # Helper scripts
│ └── bootstrap.sh # New machine setup
│
├── .claude/ # Claude Code settings
│ └── CLAUDE.md # AI assistant instructions
│
└── AGENTS.md # AI coding guidelines
To add a new config that gets symlinked automatically via apply:
1. For files in ~/.config/ (XDG config directory):
# In home.nix
xdg.configFile."app/config.toml" = {
source = ./config/app/config.toml;
# Use recursive = true for directories
};2. For files in ~/ (home directory):
# In home.nix
home.file = {
".somerc".source = ./.somerc;
".config-dir" = {
source = ./config-dir;
recursive = true;
};
};3. Add to git and apply:
git add <new-files>
applyThis setup is optimized for the Claude Code + Neovim workflow.
+------------------+------------------+
| | |
| Claude Code | Neovim |
| | |
| +------------------+
| | Shell |
+------------------+------------------+
Cmd+D- Split right (for Neovim)Cmd+Shift+T- Split down (for shell)Ctrl+H/J/K/L- Navigate between panes (vim-style)Cmd+W- Close pane
- Open Ghostty
Cmd+Dto create right paneCmd+Shift+Tto create bottom pane- Run
claudein left pane - Open files with
nvimin right pane
Uses LazyVim starter. Config is in config/nvim/ and symlinked via home-manager.
| Configuration | Description |
|---|---|
macbook |
macOS Apple Silicon |
macbook-intel |
macOS Intel |
shark |
macOS Apple Silicon (shark) |
linux |
Linux x86_64 |
Available in the devenv shell:
apply # Apply home-manager configuration
update # Update flake inputs
fmt # Format Nix files- Nix (with flakes enabled)
- direnv
- Ghostty (terminal)
- Claude Code (optional)
- LazyVim
- Daniel Miessler's workflow
- dejanr/dotfiles - Structure inspiration