LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nixos-option

inspects NixOS configuration values, showing what options are set and their

TLDR

Show an option's value, type, default and where it was set
$ nixos-option [services.openssh.enable]
copy
List the children under a namespace
$ nixos-option [services.nginx]
copy
Walk a whole subtree at once
$ nixos-option --recursive [users.users]
copy
Check which kernel modules the configuration loads
$ nixos-option boot.kernelModules
copy
Inspect a user's authorized SSH keys
$ nixos-option users.users.[username].openssh.authorizedKeys.keys
copy
Look at the configured remote build machines
$ nixos-option nix.buildMachines
copy
Query a configuration file other than the system one
$ NIXOS_CONFIG=[path/to/configuration.nix] nixos-option [option_key]
copy

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 option
NIXOS_CONFIG
Environment variable to specify an alternative configuration file

INSTALL

nix profile install nixpkgs#nixos-option
copy

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid