modules: system: move 'documentation'
This commit is contained in:
parent
377c97ea9f
commit
43ef533ae1
3 changed files with 3 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./documentation.nix
|
||||
./language.nix
|
||||
./media.nix
|
||||
./users.nix
|
||||
|
|
|
|||
40
modules/system/documentation.nix
Normal file
40
modules/system/documentation.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ 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 = lib.optional cfg.man.linux pkgs.manpages;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue