nix-rebuild
23
总安装量
22
周安装量
#16371
全站排名
安装命令
npx skills add https://github.com/edmundmiller/dotfiles --skill nix-rebuild
Agent 安装分布
opencode
22
gemini-cli
22
antigravity
22
junie
22
claude-code
22
codex
22
Skill 文档
Nix System Rebuild
After changing any Nix-managed config in ~/.config/dotfiles, the system must be rebuilt for changes to take effect. Nix store symlinks are read-only â you cannot edit them in place.
Quick Rebuild
cd ~/.config/dotfiles
sudo darwin-rebuild switch --flake .
darwin-rebuild has a NOPASSWD sudoers rule, so this works non-interactively.
Using hey
The hey command wraps rebuilds:
hey rebuild # or: hey re
hey test # build + activate without boot entry
hey rollback # roll back to previous generation
When to Rebuild
- After editing any
.nixfile - After editing config files symlinked through home-manager (lazygit, ghostty, etc.)
- When you see “permission denied” writing to a Nix store path
Workflow
- Edit source config in
~/.config/dotfiles/ - Commit changes
- Run
sudo darwin-rebuild switch --flake ~/.config/dotfiles - Verify the symlink now points to updated Nix store path