Jump to content

Template:Nixos:option: Difference between revisions

From Official NixOS Wiki
m query → show
Axka (talk | contribs)
Use new Doc-subpage
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>{{template}}{{DISPLAYTITLE:Template:nixos:option}}
<noinclude>{{DISPLAYTITLE:Template:nixos:option}}
 
{{Documentation}}
== About ==
</noinclude><includeonly><code>[https://search.nixos.org/options?show={{{1}}}  {{{2|{{{1}}}}}}]</code></includeonly>
Refer to a NixOS option linking to the <em>options.html</em> page.
 
== Usage ==
{{ic|<nowiki>{{nixos:option|powerManagement.resumeCommands}}</nowiki>}}
 
== Example ==
{{nixos:option|powerManagement.resumeCommands}}
 
</noinclude><includeonly><code>[https://search.nixos.org/options?show={{{1}}}  {{{1}}}]</code></includeonly>

Latest revision as of 12:35, 10 February 2026

Template Documentation [edit source| uses| help]

Link to a NixOS option's page on https://search.nixos.org/options.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Option1

The attribute path of the option. Note that MediaWiki additionally parses characters like < oddly in links, so this template doesn't support including e.g. `<name>` in this parameter, but does in the "Display text" parameter.

Example
users.users.*.name
Stringrequired
Display text2

Alternative text to display

Default
The value of the "Option" parameter
Example
users.users.<name>.name
Stringoptional

Example

{{nixos:option|users.users.*.name|users.users.<name>.name}}

users.users.<name>.name