A personal dotfiles repository for managing configuration files in macOS environment using Nix + Home Manager.
This repository centralizes configurations for editors, terminals, shells, and development tools, making it easy to rebuild environments and maintain backups.
- Nix with flakes support
- Git
- Rust with Cargo
When you modify configuration files:
# Add your changes to git
git add [files you add or update]
# Build without claude-code
home-manager switch --flake . --impure
# First installation of claude-code
nix profile install .#claude-code --impure
# Update the claude-code version
nix profile upgrade '.*claude-code.*' --impurecd ~/Documents/workspace/dotfiles
# Update all dependencies
nix flake update
# Update specific dependency
nix flake lock --update-input nixpkgs
# Apply updated dependencies
home-manager switch --flake . --impure
# Commit updated flake.lock
git add flake.lock
git commit -m "Update flake dependencies"
git pushcurl -L https://nixos.org/nix/install | shmkdir -p ~/.config/nix
cat > ~/.config/nix/nix.conf << 'EOF'
experimental-features = nix-command flakes
max-jobs = auto
EOFNeovim uses tree-sitter parsers for syntax highlighting and folding.
Install tree-sitter-cli so nvim-treesitter can build parsers.
cargo install tree-sitter-cliref: https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md
git clone https://github.com/tttol/dotfiles.git ~/Documents/workspace/dotfiles
cd ~/Documents/workspace/dotfilesmv ~/.config/nvim ~/.config/nvim.backup
mv ~/.wezterm.lua ~/.wezterm.lua.backup
mv ~/.zshrc ~/.zshrc.backup
mv ~/.config/starship.toml ~/.config/starship.toml.backupnix build .#homeConfigurations.$USER.activationPackage --impure
./result/activateOr install home-manager and use:
# Build without claude-code
home-manager switch --flake . --impure
# First installation of claude-code
nix profile install .#claude-code --impure
# Update the claude-code version
nix profile upgrade '.*claude-code.*' --impurels -la ~/.config/nvim
ls -la ~/.wezterm.lua
ls -la ~/.zshrc
ls -la ~/.config/starship.tomlAll files should be symlinks pointing to /nix/store/...
Home Manager tracks generations, allowing you to rollback to previous configurations:
# List generations
home-manager generations
# Rollback to specific generation
/nix/store/xxxxx-home-manager-generation/activate