nixos-option
inspects NixOS configuration values, showing what options are set and their
TLDR
List all subkeys of a given option key
SYNOPSIS
nixos-option [options] optionpath_
DESCRIPTION
nixos-option inspects NixOS configuration values, showing what options are set and their current values. It navigates the hierarchical NixOS module system using dot notation (e.g., services.nginx.enable).
The tool displays the type, default value, description, and current value of configuration options. For container options (like services.* or users.*), it lists available subkeys.
This is useful for exploring available NixOS options, debugging configuration issues, and understanding the current system state as defined by the Nix configuration.
PARAMETERS
-r, --recursive
Show all nested values recursively_option_path_
Dot-separated path to the configuration optionNIXOS_CONFIG
Environment variable to specify an alternative configuration file
CAVEATS
Evaluates the Nix configuration, which can take time on complex systems. Only shows options from the NixOS module system; arbitrary Nix expressions are not inspectable. Some dynamic options may not be fully discoverable.
SEE ALSO
nixos-rebuild(8), nix-env(1), configuration.nix(5)
