nix-config/modules/nixos/system/documentation/default.nix
Bruno BELANYI b3c0321b40
All checks were successful
ci/woodpecker/push/check Pipeline was successful
nixos: system: documentation: fix renamed option
2026-03-04 22:00:49 +01:00

46 lines
999 B
Nix

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