summary refs log tree commit diff
path: root/nixos/modules/programs/man.nix
blob: 5b20a38d885655dffd0572f8d305038d4d56823b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ config, lib, pkgs, ... }:

with lib;

{

  options = {

    programs.man.enable = mkOption {
      type = types.bool;
      default = true;
      description = ''
        Whether to enable manual pages and the <command>man</command> command.
        This also includes "man" outputs of all <literal>systemPackages</literal>.
      '';
    };

  };


  config = mkIf config.programs.man.enable {

    environment.systemPackages = [ pkgs.man-db ];

    environment.pathsToLink = [ "/share/man" ];

    environment.extraOutputsToInstall = [ "man" ];

  };

}