Agent Skills: Nix System Rebuild

>

UncategorizedID: edmundmiller/dotfiles/nix-rebuild

Install this agent skill to your local

pnpm dlx add-skill https://github.com/edmundmiller/dotfiles/tree/HEAD/.pi/skills/nix-rebuild

Skill Files

Browse the full folder contents for nix-rebuild.

Download Skill

Loading file tree…

.pi/skills/nix-rebuild/SKILL.md

Skill Metadata

Name
nix-rebuild
Description
>

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 .nix file
  • After editing config files symlinked through home-manager (lazygit, ghostty, etc.)
  • When you see "permission denied" writing to a Nix store path

Workflow

  1. Edit source config in ~/.config/dotfiles/
  2. Commit changes
  3. Run sudo darwin-rebuild switch --flake ~/.config/dotfiles
  4. Verify the symlink now points to updated Nix store path