From 55c7dfade090887ad5b8ea9004c08159d2dfd9a9 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 24 Sep 2021 19:40:12 +0200 Subject: nixos/documentation: index devman by default if enabled It's quite ridiculous that we currently require manual intervention just to have devman indexed if dev.enable == true. --- nixos/modules/misc/documentation.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index c3ded4f1ea34..1f837f9efa22 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -80,6 +80,10 @@ let ]; }; + # list of man outputs currently active intended for use as default values + # for man-related options, thus "man" is included unconditionally. + activeManOutputs = [ "man" ] ++ lib.optionals cfg.dev.enable [ "devman" ]; + in { @@ -130,7 +134,7 @@ in name = "man-paths"; paths = config.environment.systemPackages; pathsToLink = [ "/share/man" ]; - extraOutputsToInstall = ["man"]; + extraOutputsToInstall = activeManOutputs; ignoreCollisions = true; }; defaultText = literalDocBook "all man pages in "; @@ -226,7 +230,7 @@ in (mkIf cfg.man.enable { environment.systemPackages = [ pkgs.man-db ]; environment.pathsToLink = [ "/share/man" ]; - environment.extraOutputsToInstall = [ "man" ] ++ optional cfg.dev.enable "devman"; + environment.extraOutputsToInstall = activeManOutputs; environment.etc."man_db.conf".text = let manualCache = pkgs.runCommandLocal "man-cache" { } '' -- cgit 1.4.1