summaryrefslogtreecommitdiff
path: root/modules/nixos/base/documentation.nix
blob: 6f254cde617cbc5b9bfb2cd61a517f5e4e6889fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.base.documentation;
  inherit (lib) mkEnableOption mkIf;
in {
  options.base.documentation.enable = mkEnableOption "base module documentation";

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [man-pages man-pages-posix];
    documentation = {
      dev.enable = true;
      man = {
        enable = true;
        generateCaches = true;
        man-db.enable = true;
      };
    };
  };
}