summary refs log tree commit diff
path: root/nixos/modules/misc/documentation.nix
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-04-05 22:20:46 +0000
committerProfpatsch <mail@profpatsch.de>2018-04-23 15:08:58 +0200
commit483815a743e1cb1676ddef4cf5621f3216dbbaff (patch)
treed87927b0dcdb22c6b06145cc65c49140e936a7e1 /nixos/modules/misc/documentation.nix
parent2becf90c935ae8849add008d4198c2d7392818d4 (diff)
downloadnixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar.gz
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar.bz2
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar.lz
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar.xz
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.tar.zst
nixlib-483815a743e1cb1676ddef4cf5621f3216dbbaff.zip
nixos: documentation: move some code around, make docstrings more informative
Diffstat (limited to 'nixos/modules/misc/documentation.nix')
-rw-r--r--nixos/modules/misc/documentation.nix30
1 files changed, 17 insertions, 13 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index cea8981370bb..4af40a6bb42d 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/nixos/modules/misc/documentation.nix
@@ -16,7 +16,10 @@ let cfg = config.documentation; in
         description = ''
           Whether to install documentation of packages from
           <option>environment.systemPackages</option> into the generated system path.
+
+          See "Multiple-output packages" chapter in the nixpkgs manual for more info.
         '';
+        # which is at ../../../doc/multiple-output.xml
       };
 
       man.enable = mkOption {
@@ -28,25 +31,26 @@ let cfg = config.documentation; in
         '';
       };
 
-      doc.enable = mkOption {
+      info.enable = mkOption {
         type = types.bool;
         default = true;
         description = ''
-          Whether to install documentation distributed in packages' <literal>/share/doc</literal>.
-          Usually plain text and/or HTML.
-          This also includes "doc" outputs.
+          Whether to install info pages and the <command>info</command> command.
+          This also includes "info" outputs.
         '';
       };
 
-      info.enable = mkOption {
+      doc.enable = mkOption {
         type = types.bool;
         default = true;
         description = ''
-          Whether to install info pages and the <command>info</command> command.
-          This also includes "info" outputs.
+          Whether to install documentation distributed in packages' <literal>/share/doc</literal>.
+          Usually plain text and/or HTML.
+          This also includes "doc" outputs.
         '';
       };
 
+
     };
 
   };
@@ -59,6 +63,12 @@ let cfg = config.documentation; in
       environment.extraOutputsToInstall = [ "man" ];
     })
 
+    (mkIf cfg.info.enable {
+      environment.systemPackages = [ pkgs.texinfoInteractive ];
+      environment.pathsToLink = [ "/share/info" ];
+      environment.extraOutputsToInstall = [ "info" ];
+    })
+
     (mkIf cfg.doc.enable {
       # TODO(@oxij): put it here and remove from profiles?
       # environment.systemPackages = [ pkgs.w3m ]; # w3m-nox?
@@ -66,12 +76,6 @@ let cfg = config.documentation; in
       environment.extraOutputsToInstall = [ "doc" ];
     })
 
-    (mkIf cfg.info.enable {
-      environment.systemPackages = [ pkgs.texinfoInteractive ];
-      environment.pathsToLink = [ "/share/info" ];
-      environment.extraOutputsToInstall = [ "info" ];
-    })
-
   ]);
 
 }