NixOS options

Options are a central concept in NixOS. Options are used to specify whether to enable or disable functionality, or to configure how functionality should behave.

Each NixOS option has a type, which describes the kind of value which can be set for the option. Depending on the type, multiple option assignments can be merged during evaluation of the configuration. For example, if different parts of a configuration assigns values to the networking.firewall.allowedTCPPorts option, the resulting lists will be merged into a single list during evaluation.

How to set NixOS option values

After signing in and creating a flake with a compatible flake output, NixOS options may be assigned values.

To configure a NixOS option, first navigate to the target NixOS option, e.g. by using the search function on the top of the screen. When at the target NixOS option page, add your setting value, click "Apply", then select the flake output for which you wish to assign the setting.

Each NixOS option may be assigned once per flake output.

MyNixOS provides user interfaces depending on the NixOS option type, and currently supports more than 90% of the NixOS option types present in Nixpkgs. This allows most options to be configured directly without writing Nix code. Notice the type description shown to the right within each input text box.

In cases where the type is not supported, the type will be described as "Nix expression", and a raw Nix expression must entered (see Nix manual).

Take note of the option input type, as a "String" input field will not require quoting of a value (abc), while a "Nix expression" input field requires quoting ("abc") to be recognized as a string value by Nix.