skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
edmundmiller/dotfiles46 installs

nix-rebuild

Rebuild nix-darwin/NixOS system after dotfiles changes. Use when config files managed by Nix (lazygit, ghostty, etc.) need to be regenerated, or after editing any .nix file in the dotfiles repo.

How do I install this agent skill?

npx skills add https://github.com/edmundmiller/dotfiles --skill nix-rebuild
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubwarn

    This skill automates system-level configuration updates using sudo and darwin-rebuild. It relies on a NOPASSWD configuration, allowing it to modify the system state without a password prompt. While this is the intended purpose, it presents a risk if the source files in the dotfiles directory are compromised.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · No issues

  • Runlayerwarn

    1/1 file flagged

What does this agent skill do?

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

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/edmundmiller/dotfiles/nix-rebuild">View nix-rebuild on skillZs</a>