{ config, lib, pkgs, ... }:

with lib;

let cfg = config.sydnix.defaults.documentation;
in {
  options = {
    sydnix.defaults.documentation = {
      enable = mkOption {
        description = "Madeleine's default documentation settings";
        default = true;
        type = types.bool;
      };
    };
  };

  config = mkIf cfg.enable {
    documentation = {
      man.enable = true;
      info.enable = true;
    };

    environment.systemPackages = with pkgs; [
      man-pages
      stdman
      man-pages-posix
      stdmanpages
    ];
  };
}
