darwin-switch

Apply nix-darwin configuration to the current macOS host with sudo.

4|Updated Apr 10, 2023
One-click install
npx skills add https://github.com/dudeofawesome/nix-config --skill darwin-switch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: darwin-switch
Source: https://github.com/dudeofawesome/nix-config/tree/main/.claude/skills/darwin-switch
Command: npx skills add https://github.com/dudeofawesome/nix-config --skill darwin-switch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines applying nix-darwin configuration to the active Mac host, ensuring a consistent system state with minimal manual steps.

Core Features & Use Cases

  • Confirm before applying with a user prompt and require sudo.
  • Run the nix-darwin switch using the current hostname as the flake reference.
  • Report the outcome clearly, including any errors, without automatic retries.

Quick Start

Confirm the action and run the switch to apply the nix-darwin configuration to this machine.

Frequently Asked Questions about darwin-switch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply my nix-darwin configuration to a Mac?

Applying a nix-darwin configuration requires running the darwin-rebuild switch command with sudo privileges. The process uses the current macOS hostname to form the flake reference, prompting for confirmation before updating the system state.

What is the process to rebuild and switch macOS system settings with nix-darwin?

Rebuilding nix-darwin settings involves running the darwin-rebuild switch command with sudo. The operation uses the current hostname to form the flake reference, ensuring the correct system configuration is applied to the macOS host.

Do I need sudo to run a darwin-rebuild switch on macOS?

Yes, running a darwin-rebuild switch on macOS requires sudo privileges to apply the nix-darwin configuration. The operation prompts for user confirmation before executing the system rebuild to ensure intentional changes.

How does nix-darwin determine which flake to use when rebuilding the system?

Nix-darwin uses the current macOS hostname to form the flake reference during a rebuild. This ensures the darwin-rebuild switch command applies the correct system configuration tailored to the active host.

What happens if the nix-darwin switch encounters an error?

When the nix-darwin switch encounters an error, it reports the outcome clearly without automatic retries. You must manually review the reported error details and re-run the darwin-rebuild switch command after resolving the issue.