about summary refs log tree commit diff
path: root/nixos/doc/manual/from_md/development/option-def.section.xml
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/doc/manual/from_md/development/option-def.section.xml')
-rw-r--r--nixos/doc/manual/from_md/development/option-def.section.xml16
1 files changed, 8 insertions, 8 deletions
diff --git a/nixos/doc/manual/from_md/development/option-def.section.xml b/nixos/doc/manual/from_md/development/option-def.section.xml
index 3c1a979e70f33..87b290ec39c66 100644
--- a/nixos/doc/manual/from_md/development/option-def.section.xml
+++ b/nixos/doc/manual/from_md/development/option-def.section.xml
@@ -4,7 +4,7 @@
     Option definitions are generally straight-forward bindings of values
     to option names, like
   </para>
-  <programlisting language="bash">
+  <programlisting language="nix">
 config = {
   services.httpd.enable = true;
 };
@@ -21,7 +21,7 @@ config = {
       another option, you may need to use <literal>mkIf</literal>.
       Consider, for instance:
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 config = if config.services.httpd.enable then {
   environment.systemPackages = [ ... ];
   ...
@@ -34,7 +34,7 @@ config = if config.services.httpd.enable then {
       value being constructed here. After all, you could also write the
       clearly circular and contradictory:
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 config = if config.services.httpd.enable then {
   services.httpd.enable = false;
 } else {
@@ -44,7 +44,7 @@ config = if config.services.httpd.enable then {
     <para>
       The solution is to write:
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 config = mkIf config.services.httpd.enable {
   environment.systemPackages = [ ... ];
   ...
@@ -55,7 +55,7 @@ config = mkIf config.services.httpd.enable {
       of the conditional to be <quote>pushed down</quote> into the
       individual definitions, as if you had written:
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 config = {
   environment.systemPackages = if config.services.httpd.enable then [ ... ] else [];
   ...
@@ -72,7 +72,7 @@ config = {
       option defaults have priority 1500. You can specify an explicit
       priority by using <literal>mkOverride</literal>, e.g.
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 services.openssh.enable = mkOverride 10 false;
 </programlisting>
     <para>
@@ -94,7 +94,7 @@ services.openssh.enable = mkOverride 10 false;
       <literal>mkOrder 500</literal> and
       <literal>mkOrder 1500</literal>, respectively. As an example,
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 hardware.firmware = mkBefore [ myFirmware ];
 </programlisting>
     <para>
@@ -117,7 +117,7 @@ hardware.firmware = mkBefore [ myFirmware ];
       to be merged together as if they were declared in separate
       modules. This can be done using <literal>mkMerge</literal>:
     </para>
-    <programlisting language="bash">
+    <programlisting language="nix">
 config = mkMerge
   [ # Unconditional stuff.
     { environment.systemPackages = [ ... ];