summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-08-27 23:41:15 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-08-27 23:41:15 +0200
commit8a56a55bb442cbf2e2126d40df55e67b9aea0361 (patch)
tree916948eff016c868746d3a31b9e6f6120d33e449 /nixos/modules/installer
parent9667a4067c7e3f02a6a0fe8f1f3344c1cb1d7ef7 (diff)
downloadnixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar.gz
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar.bz2
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar.lz
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar.xz
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.tar.zst
nixlib-8a56a55bb442cbf2e2126d40df55e67b9aea0361.zip
nixos/manual: Use literalExample when feasible.
Should bring most of the examples into a better consistency regarding
syntactic representation in the manual.

Thanks to @devhell for reporting.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix7
-rw-r--r--nixos/modules/installer/cd-dvd/system-tarball.nix7
2 files changed, 8 insertions, 6 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index d43fa2203818..623cfdedd269 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -113,11 +113,12 @@ in
     };
 
     isoImage.contents = mkOption {
-      example =
+      example = literalExample ''
         [ { source = pkgs.memtest86 + "/memtest.bin";
             target = "boot/memtest.bin";
           }
-        ];
+        ]
+      '';
       description = ''
         This option lists files to be copied to fixed locations in the
         generated ISO image.
@@ -125,7 +126,7 @@ in
     };
 
     isoImage.storeContents = mkOption {
-      example = [pkgs.stdenv];
+      example = literalExample "[ pkgs.stdenv ]";
       description = ''
         This option lists additional derivations to be included in the
         Nix store in the generated ISO image.
diff --git a/nixos/modules/installer/cd-dvd/system-tarball.nix b/nixos/modules/installer/cd-dvd/system-tarball.nix
index eaecbe1381f5..c24fe97fba46 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball.nix
@@ -15,11 +15,12 @@ in
 {
   options = {
     tarball.contents = mkOption {
-      example =
+      example = literalExample ''
         [ { source = pkgs.memtest86 + "/memtest.bin";
             target = "boot/memtest.bin";
           }
-        ];
+        ]
+      '';
       description = ''
         This option lists files to be copied to fixed locations in the
         generated ISO image.
@@ -27,7 +28,7 @@ in
     };
 
     tarball.storeContents = mkOption {
-      example = [pkgs.stdenv];
+      example = literalExample "[ pkgs.stdenv ]";
       description = ''
         This option lists additional derivations to be included in the
         Nix store in the generated ISO image.