Prerequisites:
- Homebrew
One-liner:
cd ~ && git clone https://github.com/rodolfo-arg/Gentleman.Dots.git && \
cd Gentleman.Dots && bash scripts/install.shWhat it does:
- Requests sudo once and keeps it alive
- Installs Nix (if missing) and enables Flakes in
/etc/nix/nix.conf - Installs Ghostty via Homebrew if available (optional)
- Applies the Home Manager flake (
.#gentleman) - Registers Home‑Manager Zsh and sets it as your default shell
Afterwards:
- Start a new terminal session (or open Ghostty)
- You’re ready to go
Notes for later (custom install): the installer is structured to support an interactive “custom” mode (e.g., picking extra packages and apps) in the future. For now, it always installs the default configuration. You can pass --custom today (stub only): bash scripts/install.sh --custom.
This repository provides a complete, declarative development environment configuration using Nix Flakes and Home Manager. Everything is configured through local modules and automatically installs all dependencies.
- Languages: Node.js, Bun, Cargo/Rust, Go, GCC
- Package Managers: Volta (Node.js), Cargo, Bun
- Build Tools: Nil (Nix LSP), Nixd (Nix language server)
- Utilities: jq, bash, fd, ripgrep, coreutils, unzip, bat, yazi
- Zsh: Primary shell with modern enhancements
- Starship: Prompt configured for Zsh
- Ghostty: GPU-accelerated terminal with custom theme and keybinds
- Neovim: Fully configured IDE with LazyVim, AI assistants, and 40+ plugins
- Git & GitHub CLI: Pre-configured version control
- Lazy Git: Terminal UI for Git operations
- Copilot + CopilotChat: Inline ghost suggestions and chat
- OpenCode: AI assistant integration
- Multiple AI providers: Support for various AI coding assistants
- Television: Modern file navigator and system monitor
- Zoxide: Smart directory jumping
- Atuin: Enhanced shell history
- Carapace: Universal shell completions
- FZF: Fuzzy finder integration
- Oil.nvim: Custom file navigation scripts
- Custom Scripts: Productivity-enhancing shell scripts
- Nerd Fonts: Iosevka Term for consistent typography
- Declarative Configuration: Everything version-controlled and reproducible
The flake automatically handles system-specific configurations, installs all dependencies, and sets up your complete development environment with a single command.
- Zero Configuration: Everything works out of the box
- Declarative: Version-controlled, reproducible environment
- Modern Toolchain: Latest development tools and utilities
- AI-Enhanced: Multiple AI coding assistants integrated
- Zsh-Only Shell: Single, focused Zsh configuration
- Ghostty Terminal: Streamlined terminal setup
- macOS Optimized: Specifically tuned for macOS workflows
| Category | Tools |
|---|---|
| Package Manager | Nix with Flakes + Home Manager |
| Shell | Zsh with Starship prompt |
| Terminal | Ghostty |
| Editor | Neovim (LazyVim) |
| Languages | Node.js, Rust, Go, with Volta management |
| AI Tools | Copilot/CopilotChat, OpenCode, multiple providers |
| Navigation | Television, Yazi, Oil.nvim, Zoxide |
| Development | Git, GitHub CLI, Lazy Git |
.
├── flake.nix # Main Nix flake configuration
├── README.md # This file
├── zsh.nix # Zsh configuration
├── starship.nix # Starship prompt configuration
├── nvim.nix # Neovim configuration
├── ghostty.nix # Ghostty terminal configuration
├── opencode.nix # OpenCode AI configuration
├── television.nix # Television file navigator
├── oil-scripts.nix # Custom Oil.nvim scripts
├── nvim/ # Neovim plugins and settings
├── ghostty/ # Ghostty themes and config
├──
├── scripts/ # Custom utility scripts
└── scripts/ # Custom utility scripts
- Install Git first (required for plugin bootstrap):
- Xcode Command Line Tools:
xcode-select --install - or Homebrew:
brew install git - Ensure
git --versionworks in your terminal before proceeding.
- Xcode Command Line Tools:
sh <(curl -L https://nixos.org/nix/install)To enable the experimental features for flakes and the new nix-command (needed for our declarative setup), create/edit the configuration file:
# For daemon installation (default on macOS)
# The file may not exist, create it if needed
sudo mkdir -p /etc/nix
sudo nano /etc/nix/nix.conf
# Or: sudo vi /etc/nix/nix.confAdd:
extra-experimental-features = flakes nix-command
build-users-group = nixbld
(This is necessary because support for flakes and the new Nix command is still experimental, but it allows us to have a fully declarative and reproducible configuration.)
No need to edit flake.nix for system configuration! The flake supports both Intel and Apple Silicon Macs.
You only need to update your username in flake.nix:
- Change
home.username = "YourUser";to your actual username - The home directory is automatically set to
/Users/YourUser
This flake configures Ghostty. Install it from:
- Ghostty: https://ghostty.org/download
- Reload config with Shift + Cmd + ,
- GPU-accelerated with custom theme and keybinds
Before running the flake configuration, you need to set up Home Manager:
# Add home-manager channel
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
# Update channels
nix-channel --update
# Install home-manager
nix-shell '<home-manager>' -A installOnce you have cloned the repository and are inside its directory, run the command for your system.
. to find the flake.nix file.
If you used the quick installer, this step is already done. Otherwise:
For any Mac (the flake auto-detects your system):
home-manager switch --flake .#gentlemanAlternative: Specific system configurations:
-
Apple Silicon Macs (M1/M2/M3/M4):
home-manager switch --flake .#gentleman-macos-arm -
Intel Macs:
home-manager switch --flake .#gentleman-macos-intel
(These commands apply the configuration defined in the flake, installing all dependencies and applying the necessary settings.)
PATH is configured automatically on macOS!
shellPath="$HOME/.local/state/nix/profiles/home-manager/home-path/bin/zsh" && sudo sh -c "grep -Fxq '$shellPath' /etc/shells || echo '$shellPath' >> /etc/shells" && sudo chsh -s "$shellPath" "$USER"- Declarative Setup: All configurations are defined in Nix modules
- Automatic Deployment: Files are copied to correct macOS locations
- Dependency Management: All tools and dependencies installed automatically
- Version Pinning: Reproducible builds with locked versions
- System Integration: Proper PATH configuration and shell integration
Configurations are automatically deployed to:
| Tool | Location |
|---|---|
| Ghostty | ~/.config/ghostty/ |
| Neovim | ~/.config/nvim/ |
| Starship | ~/.config/starship.toml |
| Television | ~/.config/television/ |
- Shell Completions: Carapace-powered Zsh completions
- Smart History: Atuin for enhanced command history across shells
- Fuzzy Finding: FZF integration for quick file/command finding
- Directory Navigation: Zoxide for intelligent directory jumping
- File Management: Yazi and Television for modern file browsing
- Git Workflow: Lazy Git for streamlined version control
- GitHub Copilot: Inline ghost suggestions (no intrusive popup)
- CopilotChat: Chat-based assistance inside Neovim
- Multiple AI Providers: Support for various AI services
- Productivity Focused: AI assistants configured for maximum productivity
- Consistent Themes: Catppuccin and custom themes across all tools
- Nerd Font Support: Iosevka Term for perfect icon rendering
- GPU Acceleration: Modern terminals with hardware acceleration
- Custom Key Bindings: Vim-like navigation across all tools
Command not found after installation:
hash -r # Refresh command cache
source ~/.zshrc # or ~/.bashrcNix installation issues:
- Ensure
/etc/nix/nix.confhas experimental features enabled - Restart terminal after Nix installation
- Check that you're in the project directory when running commands
Terminal not picking up themes:
-
Nix inputs (flake.lock):
- This repo runs a best‑effort
nix flake updateon everyhome-manager switchto refresh inputs. - You can update manually too:
cd ~/Gentleman.Dots && nix flake update && home-manager switch --flake .#gentleman
- Tip: commit
flake.lockafter updates to pin versions.
- This repo runs a best‑effort
-
Neovim plugins (lazy.nvim):
- On every switch we run
nvim --headless "+Lazy! sync" +qato install/update plugins. - Manual update:
- Inside Neovim:
:Lazy sync - Headless:
nvim --headless "+Lazy! sync" +qa
- Inside Neovim:
- On every switch we run
- Disable flake auto‑update: comment/remove
home.activation.updateFlakeInputsinflake.nix. - Disable Neovim auto‑update: comment/remove
home.activation.nvimLazySyncinnvim.nix.
cd ~/Gentleman.Dotshome-manager switch --flake .#gentleman- Review changes, then commit
flake.lockif updates look good.
- Neovim saves a session on exit and restores it when you start
nvimin the same directory (with no file args). - This restores windows, tabs, layout (e.g., Neo-tree panes), and more.
Shortcuts:
<leader>qs— Save session now<leader>ql— Load session for current directory<leader>qd— Stop session (don’t save on exit)
Notes:
-
Auto-restore triggers only when starting
nvimwithout explicit files (nvimvsnvim file.lua). -
Sessions are stored under
:echo stdpath('state') .. '/sessions'. -
Terminal job buffers are not restored by Vim sessions; reopen terminals if needed.
-
For Ghostty: Use Shift + Cmd + , to reload config
-
Verify config files are in correct locations
Adding your own configurations:
- Edit the relevant
.nixfiles - Run the installation command again
- Changes are applied automatically
Managing versions:
- Update
flake.lockwith:nix flake update - Pin specific package versions in the flake
This configuration includes support for the following AI tools:
- Avante.nvim - AI‑powered coding assistant
- CopilotChat.nvim - GitHub Copilot chat interface
- OpenCode.nvim - OpenCode AI integration
- CodeCompanion.nvim - Multi‑AI provider support
- Copilot suggestions show inline as ghost text (like VS Code), not in the completion popup.
- Keymaps:
- Accept: Ctrl+Right
- Accept word: Alt+Right
- Accept line: Alt+L
- Next/Prev: Alt+] / Alt+]
- Dismiss: Ctrl+]
- Use one assistant at a time to avoid conflicts.
- Enable/disable plugins under
nvim/lua/plugins/as needed. - Restart Neovim after changes.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Test your changes thoroughly
- Submit a pull request
For questions or issues, open a GitHub issue.
Happy coding! 🚀
— Gentleman Programming