olafkfreund/nix-skills/nix-darwin

Claude Code and agent skill by olafkfreund/nix-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Configure, build and troubleshoot nix-darwin macOS system configurations and darwin-rebuild generations.

Install

npx vskill@latest install olafkfreund/nix-skills/nix-darwin

SKILL.md

nix-darwin

Read the repository instructions, the flake (a darwinConfigurations output) or configuration.nix, its nix-darwin and Nixpkgs pins, and the host name before editing. The bundled README covers prerequisites, flake and channel setups, updating and uninstalling. It describes the snapshot in sources.json, not necessarily the user's pin. Check version-sensitive behaviour against the user's nix-darwin revision.

Applying configuration

darwin-rebuild builds and activates a configuration:

CommandEffectNeeds root
darwin-rebuild build --flake .#HOSTBuild only, leaving ./resultNo
darwin-rebuild check --flake .#HOSTBuild and run activation checksYes
darwin-rebuild switch --flake .#HOSTBuild, activate and make it the current generationYes
darwin-rebuild --list-generationsList system generationsNo
darwin-rebuild --rollbackActivate the previous generationYes
darwin-rebuild --switch-generation NActivate generation N (-G N)Yes
darwin-rebuild changelog --flake .#HOSTBuild, then page the configuration's nix-darwin change logNo

Without .#HOST, the flake attribute defaults to the Mac's LocalHostName. Without --flake, darwin-rebuild uses /etc/nix-darwin/flake.nix if it exists, and otherwise the channel-based configuration.nix. Pass --no-flake to force the latter. Commands that need root are run with sudo.

Start with build to validate a change. check, switch, activate, rollbacks and uninstalling change the running system. Propose them with the exact command, and run them only with the user's authorization. The README's uninstall steps are reference, never an action to take on your own.

Related configuration

Home Manager loaded as a nix-darwin module (home-manager.darwinModules) is applied by darwin-rebuild, not home-manager switch. Use the home-manager skill if it is installed, or the Home Manager manual. Nix settings on nix-darwin are declared through nix.settings. Do not edit /etc/nix/nix.conf by hand. Nix itself, and its installer's choices, belong to the host; check them before changing daemon settings.

Options are not bundled. Search them in the user's pinned nix-darwin source, or in the nix-darwin option documentation for that revision.

Modified upstream material is covered by LICENSE.

Nix style

  • Never search /nix/store (for example find /nix/store/*foo-* -name libfoo.so)

and never copy a literal store path. Find the providing package with nix-locate, and refer to it through Nix: ${pkgs.foo}/lib or lib.makeLibraryPath [ pkgs.foo ].

  • Do not quote attribute names that are valid identifiers

([A-Za-z_][A-Za-z0-9_'-]*, dashes included). Write pkgs.foo-bar and packages.x86_64-linux, not pkgs."foo-bar". Quote only other names (".config/foo", "2.0"), the keywords assert else if in inherit let or rec then with, and interpolations ("${name}"). Upstream examples in references sometimes quote needlessly; do not copy that style.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/olafkfreund/nix-skills/nix-darwin/badge)](https://verified-skill.com/skills/olafkfreund/nix-skills/nix-darwin)

Something wrong with this skill or its page? Tell us.