doc: Use prompt more often
This commit is contained in:
@@ -106,21 +106,21 @@ The unique option `services.httpd.adminAddr' is defined multiple times, in `/etc
|
||||
configuration option is. The command <option>nixos-option</option> allows you
|
||||
to find out:
|
||||
<screen>
|
||||
$ nixos-option <xref linkend="opt-services.xserver.enable"/>
|
||||
<prompt>$ </prompt>nixos-option <xref linkend="opt-services.xserver.enable"/>
|
||||
true
|
||||
|
||||
$ nixos-option <xref linkend="opt-boot.kernelModules"/>
|
||||
<prompt>$ </prompt>nixos-option <xref linkend="opt-boot.kernelModules"/>
|
||||
[ "tun" "ipv6" "loop" <replaceable>...</replaceable> ]
|
||||
</screen>
|
||||
Interactive exploration of the configuration is possible using <command>nix
|
||||
repl</command>, a read-eval-print loop for Nix expressions. A typical use:
|
||||
<screen>
|
||||
$ nix repl '<nixpkgs/nixos>'
|
||||
<prompt>$ </prompt>nix repl '<nixpkgs/nixos>'
|
||||
|
||||
nix-repl> config.<xref linkend="opt-networking.hostName"/>
|
||||
<prompt>nix-repl> </prompt>config.<xref linkend="opt-networking.hostName"/>
|
||||
"mandark"
|
||||
|
||||
nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
|
||||
<prompt>nix-repl> </prompt>map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
|
||||
[ "example.org" "example.gov" ]
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
Reference in New Issue
Block a user