diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index 4af40a6bb42d..2e426c017080 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -50,6 +50,21 @@ let cfg = config.documentation; in ''; }; + dev.enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to install documentation targeted at developers. + + This includes man pages targeted at developers if is + set (this also includes "devman" outputs). + This includes info pages targeted at developers if + is set (this also includes "devinfo" outputs). + This includes other pages targeted at developers if + is set (this also includes "devdoc" outputs). + + ''; + }; }; @@ -60,20 +75,20 @@ let cfg = config.documentation; in (mkIf cfg.man.enable { environment.systemPackages = [ pkgs.man-db ]; environment.pathsToLink = [ "/share/man" ]; - environment.extraOutputsToInstall = [ "man" ]; + environment.extraOutputsToInstall = [ "man" ] ++ optional cfg.dev.enable [ "devman" ]; }) (mkIf cfg.info.enable { environment.systemPackages = [ pkgs.texinfoInteractive ]; environment.pathsToLink = [ "/share/info" ]; - environment.extraOutputsToInstall = [ "info" ]; + environment.extraOutputsToInstall = [ "info" ] ++ optional cfg.dev.enable [ "devinfo" ]; }) (mkIf cfg.doc.enable { # TODO(@oxij): put it here and remove from profiles? # environment.systemPackages = [ pkgs.w3m ]; # w3m-nox? environment.pathsToLink = [ "/share/doc" ]; - environment.extraOutputsToInstall = [ "doc" ]; + environment.extraOutputsToInstall = [ "doc" ] ++ optional cfg.dev.enable [ "devdoc" ]; }) ]);