diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index cea8981370b..4af40a6bb42 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 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,6 +31,15 @@ let cfg = config.documentation; in ''; }; + info.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install info pages and the info command. + This also includes "info" outputs. + ''; + }; + doc.enable = mkOption { type = types.bool; default = true; @@ -38,14 +50,6 @@ let cfg = config.documentation; in ''; }; - info.enable = mkOption { - type = types.bool; - default = true; - description = '' - Whether to install info pages and the info command. - This also includes "info" 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" ]; - }) - ]); }