This repository uses Nix with a modular structure for managing system configuration and dotfiles across macOS and Linux.
The configuration is organised into modular files:
flake.nix- Main entry point with inputs/outputsnix/home.nix- Home Manager configuration (cross-platform)- Dotfiles symlinks using
home.file - User package list
- Platform-specific packages via
pkgs.stdenv.isDarwin
- Dotfiles symlinks using
nix/darwin.nix- macOS system configuration (nix-darwin)- System settings and user configuration
- Homebrew packages (taps, brews, casks, masApps)
nix/overlays.nix- Package overlays for AI tools
-
Install Determinate Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
-
Clone this repository:
git clone https://github.com/ryoppippi/dotfiles.git ~/ghq/github.com/ryoppippi/dotfiles cd ~/ghq/github.com/ryoppippi/dotfiles
-
Apply the nix-darwin configuration (this will also install Homebrew automatically):
sudo nix run nix-darwin -- switch --flake .#ryoppippi -
Reload your shell:
exec fish
-
Install Nix (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
-
Clone this repository:
git clone https://github.com/ryoppippi/dotfiles.git ~/ghq/github.com/ryoppippi/dotfiles cd ~/ghq/github.com/ryoppippi/dotfiles
-
Apply Home Manager configuration:
nix run .#switch
After modifying configuration files (flake.nix, nix/home.nix, nix/darwin.nix):
# Apply changes (macOS or Linux)
nix run .#switch
# Update dependencies (macOS only)
nix run .#update
# Test build without applying
nix run .#buildnix run .#switch- Build and apply darwin + Home Manager configurationnix run .#update- Update flake.lock dependenciesnix run .#update-ai-tools- Update llm-agents and claude-code-overlay inputsnix run .#build- Build configuration (dry run)
nix run .#switch- Build and apply Home Manager configurationnix run .#build- Build configuration (dry run)
All dotfiles are managed via Home Manager's home.file with symlinks to the repository:
- Symlinks are automatically created on
nix run .#switch - Dotfiles remain mutable in the repository
- No separate dotfiles CLI needed
- AI Development Tools: claude-code, codex, cursor-agent, opencode, copilot-cli, coderabbit-cli
- Core Tools: git, neovim, fish, tmux, ripgrep, fd, fzf, bat, eza, and more
- Development: Go, Node.js, Bun, Deno, language servers
- System Configuration (macOS): Touch ID for sudo, Homebrew integration