nix-config/modules/documentation.nix
Bruno BELANYI 2b6399606a modules: documentation: use 'mkDisableOption'
The documentation module already gates behind 'documentation.enable' for
the other options.
2021-05-10 00:31:01 +02:00

33 lines
706 B
Nix

{ config, lib, ... }:
let
cfg = config.my.module.documentation;
in
{
options.my.module.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";
nixos.enable = mkDisableOption "NixOS documentation";
};
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;
};
}