Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Searching and changing options

The Options page lists every NixOS option of your host. The first time, the app builds an option index from your system flake, which can take a minute; afterwards it is cached and only rebuilt when your flake changes.

Searching

Type into the search field (Search … options…). Each word you type must appear in the option’s name or description; the best matches come first. The line under the filters shows how many options match. Long result lists end with a Show more (… left) button.

Each row shows the option name, the start of its description and some tags:

  • its type (for example boolean or list),
  • = …: its current value, once values are evaluated,
  • set in config: your own configuration sets it,
  • managed: the app’s generated file sets it,
  • staged or staged reset: you have a change for it that is not applied yet,
  • read-only: it cannot be set.

Filters

  • All areas: click to limit the list to one area, such as services or boot. The list of areas can be filtered by typing.
  • Set in my configuration: show only options your own files define. It becomes available once the current values are evaluated.
  • Include <name> templates: also show options of named entries, such as users.users.<name>.shell. These cannot be set directly; search for the concrete name instead (for example users.users.alice.shell) or set them in your own configuration.

The refresh button at the top re-evaluates options and values.

The details page

Click an option to open its details next to the list.

The page shows:

  • the full name, the type and tags such as set in your configuration, managed by DrakeFlake or change staged,
  • the description,
  • Current value: the value your configuration evaluates to. It is evaluated when you open the option. If that fails, you see the error and a Try again button.
  • Set in:: the files of your configuration that set the option, with the line. Click one to open it in your editor (see Where is this set?).
  • Default, Example and Declared in: the option’s documentation. For options from nixpkgs, Declared in links to the module on GitHub.

The buttons at the top copy the option name (Copy name), evaluate the value again (Re-evaluate) and close the page (Close).

Changing an option

The Change section has these fields.

Enter as

  • Value: enter a plain value with an editor that fits the type: a switch for booleans (Enabled/Disabled), a number field, a list to choose from for enumerations, a text field for strings and paths, and one item per line for lists. For package options, type the package attribute, for example firefox or kdePackages.kate. Options that can be null have an Unset (null) box.
  • Nix expression: type any Nix expression. config, lib and pkgs are in scope, so you can write for example config.networking.hostName + "-vm". The expression is written as typed (in parentheses), and it is parsed and type-checked before saving.

Options whose type has no simple editor (shown with the type raw) are always entered as a Nix expression; they are syntax-checked before saving.

Priority

NixOS merges the definitions of an option from all files of your configuration. Priority decides how the app’s setting combines with yours. The choices depend on the option:

PriorityWhat it does
OverrideWins over your configuration (lib.mkOverride 90)
DefaultYour configuration wins (lib.mkDefault)
NormalSame priority as your configuration; different values conflict
ForceWins over everything (lib.mkForce)
Add (merge)Added to the items of your configuration
Add firstAdded before the other items (lib.mkBefore)
Add lastAdded after the other items (lib.mkAfter)
ReplaceReplaces what your configuration defines (lib.mkForce)

If you do not choose one, single values use Override and lists and attribute sets use Add (merge). The hint next to the field explains the chosen priority.

Applies to

If several hosts import the same generated file, you can limit a setting to this host:

  • All hosts that import the file: every host that imports the generated file gets the setting.
  • Only this host (…): the setting is written under lib.mkIf (config.networking.hostName == "…"), so other hosts importing the file ignore it.

“Only this host” needs the evaluated networking.hostName of your system, so it becomes available a moment after the page opens. It is not offered for networking.hostName itself.

Staging

  • Stage change (or Update staged change): put the change into the list on the Changes page. Nothing is written yet.
  • Revert: undo your edits in the editor.
  • Unstage: drop the staged change.
  • Remove from DrakeFlake file: for an option the generated file already sets, stage its removal. The option then goes back to whatever the rest of your configuration defines.

Type checks

Values are checked twice:

  • While you type, the value is checked against the option type. An invalid value shows the reason, and Stage change stays disabled.
  • After staging, the app checks the value against your configuration’s option types in the background. The result appears under the buttons (“Matches the option type”) and on the Changes page. Changes cannot be applied while a staged value does not match its type.

Where is this set?

Under Current value, Set in: lists the files that define the option, with a line number. The app finds the line from the file’s syntax tree (nested attribute sets, config = … and lib.mkIf/lib.mkMerge wrappers included). Files that come from a flake input instead of your own flake are marked “(flake input, read-only)”.

Clicking a location opens the file at that line:

  1. in your default text editor, when it is one that can jump to a line (Kate, KWrite, VS Code, VSCodium, Zed, GNOME Text Editor or Emacs),
  2. otherwise in $VISUAL or $EDITOR in a terminal,
  3. otherwise with the default app for .nix files.

Everything your host sets: the Configured page

The Configured page lists every option your host’s own configuration files define, with its current value and the file it is set in. Use the filter field to narrow it down and click an option to open its details. The first run can take several minutes; afterwards it is cached.