about summary refs log tree commit diff
path: root/nixos/modules/misc
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2021-10-03 18:06:03 +0200
committerNaïm Favier <n@monade.li>2021-10-04 12:47:20 +0200
commit2ddc335e6f32b875e14ad9610101325b306a0add (patch)
tree2a4591c137cb363a6ec09f529d587a10aa7a0bc7 /nixos/modules/misc
parent330b1e08b8df4e1f0100a0a7810ec3157749e5ee (diff)
nixos/doc: clean up defaults and examples
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r--nixos/modules/misc/documentation.nix4
-rw-r--r--nixos/modules/misc/locate.nix4
-rw-r--r--nixos/modules/misc/nixpkgs.nix18
3 files changed, 13 insertions, 13 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index ec6b2ad3b8816..c3ded4f1ea340 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/nixos/modules/misc/documentation.nix
@@ -133,7 +133,7 @@ in
           extraOutputsToInstall = ["man"];
           ignoreCollisions = true;
         };
-        defaultText = "all man pages in config.environment.systemPackages";
+        defaultText = literalDocBook "all man pages in <option>config.environment.systemPackages</option>";
         description = ''
           The manual pages to generate caches for if <option>generateCaches</option>
           is enabled. Must be a path to a directory with man pages under
@@ -211,7 +211,7 @@ in
           Which extra NixOS module paths the generated NixOS's documentation should strip
           from options.
         '';
-        example = literalExample ''
+        example = literalExpression ''
           # e.g. with options from modules in ''${pkgs.customModules}/nix:
           [ pkgs.customModules ]
         '';
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 5d2f9a21bc524..2f2986c2fec5a 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -25,8 +25,8 @@ in {
     locate = mkOption {
       type = package;
       default = pkgs.findutils;
-      defaultText = "pkgs.findutils";
-      example = "pkgs.mlocate";
+      defaultText = literalExpression "pkgs.findutils";
+      example = literalExpression "pkgs.mlocate";
       description = ''
         The locate implementation to use
       '';
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index a2ac5c58528af..08bc4398555b7 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/nixos/modules/misc/nixpkgs.nix
@@ -67,13 +67,13 @@ in
   options.nixpkgs = {
 
     pkgs = mkOption {
-      defaultText = literalExample
-        ''import "''${nixos}/.." {
-            inherit (cfg) config overlays localSystem crossSystem;
-          }
-        '';
+      defaultText = literalExpression ''
+        import "''${nixos}/.." {
+          inherit (cfg) config overlays localSystem crossSystem;
+        }
+      '';
       type = pkgsType;
-      example = literalExample "import <nixpkgs> {}";
+      example = literalExpression "import <nixpkgs> {}";
       description = ''
         If set, the pkgs argument to all NixOS modules is the value of
         this option, extended with <code>nixpkgs.overlays</code>, if
@@ -109,7 +109,7 @@ in
 
     config = mkOption {
       default = {};
-      example = literalExample
+      example = literalExpression
         ''
           { allowBroken = true; allowUnfree = true; }
         '';
@@ -125,7 +125,7 @@ in
 
     overlays = mkOption {
       default = [];
-      example = literalExample
+      example = literalExpression
         ''
           [
             (self: super: {
@@ -158,7 +158,7 @@ in
       # Make sure that the final value has all fields for sake of other modules
       # referring to this. TODO make `lib.systems` itself use the module system.
       apply = lib.systems.elaborate;
-      defaultText = literalExample
+      defaultText = literalExpression
         ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
       description = ''
         Specifies the platform on which NixOS should be built. When