nix-module-options

Query NixOS and Home Manager module options via flake evaluation.

16|1|Updated Apr 25, 2023
One-click install
npx skills add https://github.com/OJII3/dotfiles --skill nix-module-options-ojii3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-module-options
Source: https://github.com/OJII3/dotfiles/tree/main/modules/home/ai/skills/nix-module-options
Command: npx skills add https://github.com/OJII3/dotfiles --skill nix-module-options-ojii3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers and admins to query NixOS and Home Manager module options programmatically using flake evaluation, reducing guesswork and manual lookups when configuring systems.

Core Features & Use Cases

  • Offline queries: evaluate options without web searches or external documentation.
  • Upstream purity: queries only upstream NixOS/Home Manager modules (excludes user custom modules).
  • System-agnostic & fast: uses currentSystem data and pre-evaluated pkgs for portability and performance.
  • Documentation-ready: returns option paths with type, description, default, and examples via optionAttrSetToDocList.
  • Use Case: check if a module exists, list available options, or fetch full documentation for a given option.

Quick Start

To begin, ask the skill to inspect a specific module option or to enumerate options in a category. For example, "What options does programs.git have in Home Manager?" The response will provide structured, upstream-focused option metadata ready for interpretation.

Frequently Asked Questions about nix-module-options

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

FAQPage Schema
How do I query NixOS module options offline without web searches?

You can query NixOS module options offline by evaluating flakes directly. This approach uses currentSystem data and pre-evaluated pkgs to return structured option metadata without external documentation lookups.

Can I check if a specific option exists in Home Manager programmatically?

Yes, you can check for option existence in Home Manager programmatically. Using flake evaluation, the system verifies if a specific module option path exists upstream and returns the validation result.

How do I list available options for a NixOS module category?

To list available options for a NixOS module category, you use flake evaluation to enumerate them. The process targets upstream-pure modules and returns structured metadata including option paths, types, and defaults via optionAttrSetToDocList.

Does querying NixOS options this way include my custom module configurations?

No, querying NixOS options this way does not include custom module configurations. It strictly targets upstream-pure modules, evaluating only the official NixOS and Home Manager repositories to ensure standard documentation retrieval.

What metadata is returned when I fetch documentation for a Nix flake option?

Fetching documentation for a Nix flake option returns structured metadata including the option path, type, description, default value, and examples. This data is extracted upstream using optionAttrSetToDocList for immediate interpretation.

Why use pre-evaluated pkgs when inspecting Home Manager module options?

Using pre-evaluated pkgs when inspecting Home Manager module options ensures system-agnostic portability and faster evaluation. It allows the offline query process to bypass redundant package builds and directly return option metadata.