Forrest logo
back to the nixos-option tool


nixos-option: List all subkeys of a given option key.
$ nixos-option ${option_key}
try on your machine

The nixos-option command is a utility in NixOS, a Linux distribution that relies on the Nix package manager. This command is used to display information about a specific NixOS configuration option.

The syntax of the nixos-option command is as follows:

nixos-option ${option_key}

Here, ${option_key} refers to the specific configuration option you want to inspect. This can be any valid NixOS option, such as services.ssh.enable, networking.firewall.enable, etc.

When you execute the nixos-option command with a specified option key, it retrieves the value and details of that particular configuration option. This can include information like the default value, type, description, and possible options for that setting.

For example, if you run nixos-option services.ssh.enable, it will output whether the SSH service is currently enabled or disabled in your NixOS configuration.

This command is often useful for exploring and verifying NixOS configuration options before making any changes, as well as when troubleshooting issues related to specific settings.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the nixos-option tool