2021-04-17 13:40:28 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.module.documentation;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.my.module.documentation = with lib.my; {
|
|
|
|
enable = mkDisableOption "Documentation integration";
|
|
|
|
|
2021-05-07 17:04:18 +02:00
|
|
|
dev.enable = mkDisableOption "Documentation aimed at developers";
|
2021-04-17 13:40:28 +02:00
|
|
|
|
2021-05-07 17:04:18 +02:00
|
|
|
info.enable = mkDisableOption "Documentation aimed at developers";
|
2021-04-17 13:40:28 +02:00
|
|
|
|
2021-05-07 17:04:18 +02:00
|
|
|
man.enable = mkDisableOption "Documentation aimed at developers";
|
2021-04-17 13:40:28 +02:00
|
|
|
|
2021-05-07 17:04:18 +02:00
|
|
|
nixos.enable = mkDisableOption "NixOS documentation";
|
2021-04-17 13:40:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config.documentation = {
|
|
|
|
enable = cfg.enable;
|
|
|
|
|
|
|
|
dev.enable = cfg.dev.enable;
|
|
|
|
|
|
|
|
info.enable = cfg.info.enable;
|
|
|
|
|
|
|
|
man = {
|
|
|
|
enable = cfg.man.enable;
|
|
|
|
generateCaches = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nixos.enable = cfg.nixos.enable;
|
|
|
|
};
|
|
|
|
}
|