modules: documentation: add linux man pages option
I want to be able to read about syscalls or the C library.
This commit is contained in:
parent
2b6399606a
commit
ddffa1f247
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.module.documentation;
|
||||
in
|
||||
|
@ -10,13 +10,18 @@ in
|
|||
|
||||
info.enable = mkDisableOption "Documentation aimed at developers";
|
||||
|
||||
man.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.documentation = {
|
||||
enable = cfg.enable;
|
||||
config = lib.mkIf cfg.enable {
|
||||
documentation = {
|
||||
enable = true;
|
||||
|
||||
dev.enable = cfg.dev.enable;
|
||||
|
||||
|
@ -29,4 +34,7 @@ in
|
|||
|
||||
nixos.enable = cfg.nixos.enable;
|
||||
};
|
||||
|
||||
environment.systemPackages = lib.optional cfg.man.linux pkgs.manpages;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue