nix-config/modules/system/documentation.nix
Bruno BELANYI e6ba569b36
All checks were successful
continuous-integration/drone/push Build is passing
modules: system: documentation: include POSIX man
2021-06-12 13:23:09 +02:00

44 lines
960 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.system.documentation;
in
{
options.my.system.documentation = with lib.my; {
enable = mkDisableOption "Documentation integration";
dev.enable = mkDisableOption "Documentation aimed at developers";
info.enable = mkDisableOption "Documentation aimed at developers";
man = {
enable = mkDisableOption "Documentation aimed at developers";
linux = mkDisableOption "Linux man pages (section 2 & 3)";
};
nixos.enable = mkDisableOption "NixOS documentation";
};
config = lib.mkIf cfg.enable {
documentation = {
enable = true;
dev.enable = cfg.dev.enable;
info.enable = cfg.info.enable;
man = {
enable = cfg.man.enable;
generateCaches = true;
};
nixos.enable = cfg.nixos.enable;
};
environment.systemPackages = with pkgs; lib.optionals cfg.man.linux [
man-pages
man-pages-posix
];
};
}