nixarchy.pkg — the manual

NixOS options

Every NixOS option there is — about 25,500 of them, including over 2,000 services.*.enable. This is how you reach a service the curated catalogue does not carry, which is most of them.

Searching options

/ searches. Each row shows the option’s path and its declared type. Until the first options refresh, the list comes from the system manual’s options.json, rather than a guessed set of option names.

Where the options come from

The list is read from your own flake: the options of the host you are on, including those your modules declare and the programs.nixarchy.* ones. It is read when the index is rebuilt (r) and after every apply, in the background, and cached.

Setting one

RETURN opens a form built from the option’s declared type. Not a text box with a label — an actual widget, when the type admits one.

A boolean option

Type What you get
boolean A checkbox. SPACE flips it
enum The alternatives, j/k to choose
integer A number field, with declared bounds checked before writing
string / path A text field
strings concatenated with "\n" A multi-line field that writes one escaped Nix string
list of strings or integers One item per line; [ ] writes an empty list
package A package search field, when apps.nix takes pkgs
null or one of these types The widget plus a null choice; CTRL+N toggles it
anything else See below

The form shows the type, documentation, and default. Its footer shows the submit key for the current editor. ESCAPE cancels.

String lists keep each nonblank line as one item, including a line such as console=ttyS0,115200n8. Integer lists check each item’s declared bounds. The multi-line string field writes newline escapes inside one Nix string. For the multi-line editors, RETURN adds a line and CTRL+RETURN writes. Package suggestions come from the package index; UP/DOWN moves through them and RETURN chooses the selected package as pkgs.<attr>.

The form checks non-empty string, absolute path, and string, not containing newlines or colons constraints before writing. The adapter also checks these constraints on single string literals and lists of string literals. Other Nix expressions still use the scaffold editor.

Options with <name> or * in their path ask for each name above the value field. Fill every name before writing; an empty field says name every <name> first. Names such as alice are written directly. A name with spaces or / is written as a quoted key, such as fileSystems."/mnt/usb drive".options. Nix keywords such as if are quoted too. A name containing ", \, $, a tab, newline, or #@ is refused.

An untouched field writes nothing

This is the rule worth internalising, and it is deliberate.

The value the form shows you is the default — or, when the option is already set, the value in apps.nix, labelled set in apps.nix. If you leave it alone and press RETURN, nothing is written — because the default is already in force, and a copied-out default is a line that reads like a decision and is not one. Six months later you cannot tell which of your option lines you meant and which the form put there.

So: change it, or cancel. Both are honest. Writing out what was already true is not.

Why some options get a text box instead of a widget

A scaffolded option

Only the exact types above get widgets. Pattern strings, attribute sets, submodules, functions, and lists of more complex values use the scaffold. Package types also use it when apps.nix does not take pkgs; the form says why.

They get the option’s example or default in a text box, alongside the type and documentation. Edit it and press CTRL+RETURN to write the expression to the selection for the next apply. RETURN adds a line. An untouched editor writes nothing.

That is not the form giving up. A widget for “a list of submodules” would have to pretend to understand Nix, and the first thing it would do is let you write something that parses and means the wrong thing. A plain text box with the real example in it, which you edit as Nix, gets you further than a widget that guesses.

The writer runs a parse check either way, so a value that would leave the file unparseable is refused and nothing is changed — and the message you get is nix’s own words rather than a guess at them.

Changing one

RETURN on an option that is already set opens the form on its value. Change it and press RETURN, and the line is replaced where it stands, in one step that either changes it or leaves the file exactly as it was. A value the widget cannot hold exactly — lib.mkDefault true, an expression — opens as its own text to edit.

Removing one

SPACE on an option row that is already set removes it. The option reverts to its default, which is what it was before you touched it.

User scope

Home Manager options appear with a user badge. They are written to home.nix for the account running the panel. This requires Home Manager as a NixOS module, that account in home-manager.users, home-manager.useGlobalPkgs = true, and a nixarchy version with the Home Manager part and its installed home template (/etc/nixarchy/home-apps-template.nix). A disabled row shows the reason. One user owns home.nix on a host: user scope is for that user (or for whoever applies an edited home.nix first). Another user sees the owner’s name as the reason, and a nixarchy that cannot say who owns it leaves user scope off, and check unknown when you have a home.nix (or, with any nixarchy that has --home-plan, when its answer is unusable).

Removing a selection can leave a declaration elsewhere in the flake in effect. check evaluates the combined configuration and reports conflicting option values. For user scope check evaluates the same file nixarchy-apply will write (filled from that template), so a failed assertion (useGlobalPkgs, a non-normal user, no Home Manager configuration of your own) is reported with nix’s message. check follows nixarchy-apply’s decision about home.nix (who owns it, and whether your file is copied), so it evaluates what apply will write; if apply would refuse, check fails with the same text.