·nix-platform-specific-options
</>

nix-platform-specific-options

Write Nix modules with platform-specific options (NixOS vs Darwin) without infinite recursion. Use when mkIf causes evaluation errors or options don't exist across platforms.

34Installs·2Trend·@edmundmiller

Installation

$npx skills add https://github.com/edmundmiller/dotfiles --skill nix-platform-specific-options

How to Install nix-platform-specific-options

Quickly install nix-platform-specific-options AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/edmundmiller/dotfiles --skill nix-platform-specific-options
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: edmundmiller/dotfiles.

SKILL.md

View raw

When writing Nix modules that need to hide platform-specific options (NixOS vs Darwin), using mkIf alone causes infinite recursion. This skill documents the correct pattern.

mkIf is evaluated lazily but the option path is still visible during module evaluation. This causes errors like:

Or infinite recursion when config is referenced in option defaults or optionalAttrs conditions.

Write Nix modules with platform-specific options (NixOS vs Darwin) without infinite recursion. Use when mkIf causes evaluation errors or options don't exist across platforms. Source: edmundmiller/dotfiles.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/edmundmiller/dotfiles --skill nix-platform-specific-options
Category
</>Dev Tools
Verified
First Seen
2026-02-22
Updated
2026-03-10

Browse more skills from edmundmiller/dotfiles

Quick answers

What is nix-platform-specific-options?

Write Nix modules with platform-specific options (NixOS vs Darwin) without infinite recursion. Use when mkIf causes evaluation errors or options don't exist across platforms. Source: edmundmiller/dotfiles.

How do I install nix-platform-specific-options?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/edmundmiller/dotfiles --skill nix-platform-specific-options Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/edmundmiller/dotfiles