nixos-option(8)
π nixos-option(8) β system manager's manual, but make it cute π
okay so bestie, this is the nixos-option(8) page from the System Manager's Manual β and it's literally your little flashlight for peeking inside a NixOS configuration. π¦β¨
β¨ NAME β¨
nixos-option β inspect a NixOS configuration. That's the whole vibe: you point it at an option, it tells you things. π
πΈ SYNOPSIS πΈ
The shape of it, bestie:
nixos-option [-r | --recursive] [-I path] [-F | --flake flake-uri]
[--no-flake] [--show-trace] option.name
π¦ DESCRIPTION π¦
This command evaluates the configuration specified in NIXOS_CONFIG, nixos-config in NIX_PATH (which by default is /etc/nixos/configuration.nix), /etc/nixos/flake.nix, or the file and attribute specified by the -I or --flake parameter β and then it returns the properties of the option name you gave as the argument. No cap, it's giving "config detective" energy. π΅οΈββοΈπ
When the option name is not an option but an attribute set, the command prints the list of attributes contained in it. When no option name is given, the command prints all top-level attributes in the given NixOS configuration. Slay. π
π OPTIONS π
-r,--recursiveβ Print all the values at or below the specified path recursively. Yes bestie, it goes deep. π-I pathβ Add an entry to the Nix expression search path. This option is passed to the underlyingnix-instantiate(1)invocation.--show-traceβ Print eval trace. This option is passed to the underlyingnix-instantiate(1)invocation.-F,--flake flake-uriβ Specify the flake containing NixOS configuration. It defaults to/etc/nixos/flake.nix; if the flake exists, it must contain an output namednixosConfigurations.name. If name is omitted, it defaults to the current host name. π₯οΈβ¨--no-flakeβ Do not imply--flakeif/etc/nixos/flake.nixexists. With this option, it is possible to show options in non-flake NixOS configurations even if the current NixOS systems uses flakes. (Yes, "systems uses flakes" β we are not editing the sacred text, bestie. π)
π ENVIRONMENT π
NIXOS_CONFIGβ Path to the main NixOS configuration module. Defaults to/etc/nixos/configuration.nix. Your main-character config file, basically. π
π EXAMPLES π
Investigate option values:
$ nixos-option boot.loader
This attribute set contains:
generationsDir
grub
initScript
$ nixos-option boot.loader.grub.enable
Value:
true
Default:
true
Type:
boolean
Description:
Whether to enable the GNU GRUB boot loader.
Declared by:
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix
Defined by:
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix
That's it β that's the example. It ate, honestly. π
π«Ά SEE ALSO π«Ά
configuration.nix(5) β go read that one too, bestie. πβ¨
π AUTHORS π
Nicolas Pierron and the Nixpkgs/NixOS contributors. Iconic behavior. π
Cute sign-off time: this page is from Debian, dated January 1, 1980, and it's the nixos-option(8) manual β bye bestie, go inspect some options! π
ππ
π¦ where this page comes from
- nixos 26.05: nixos-option
- nixpkgs unstable: nixos-option 26.11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms