about summary refs log tree commit diff
path: root/nixos/modules/misc/nixpkgs.nix
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/nixpkgs.nix
parent330b1e08b8df4e1f0100a0a7810ec3157749e5ee (diff)
nixos/doc: clean up defaults and examples
Diffstat (limited to 'nixos/modules/misc/nixpkgs.nix')
-rw-r--r--nixos/modules/misc/nixpkgs.nix18
1 files changed, 9 insertions, 9 deletions
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