diff options
author | sternenseemann <sternenseemann@systemli.org> | 2021-09-24 19:40:12 +0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-11-22 23:39:42 +0100 |
commit | 55c7dfade090887ad5b8ea9004c08159d2dfd9a9 (patch) | |
tree | 3f83c5ceec2582401b72e362af144b6e7d69f850 /nixos | |
parent | daa8c59404ba38fef684996e1cc98f5e5a634780 (diff) |
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/misc/documentation.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index c3ded4f1ea340..1f837f9efa22d 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 <option>config.environment.systemPackages</option>"; @@ -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" { } '' |