37 lines
No EOL
905 B
Nix
37 lines
No EOL
905 B
Nix
{ lib, pkgs, config, ...}: let
|
|
inherit (lib) mkIf mkEnableOption mkOption types;
|
|
cfg = config.chuj.stuff.documentation;
|
|
user = config.chuj.system.user;
|
|
in {
|
|
options.chuj.stuff.documentation = {
|
|
enable = mkEnableOption "documentation";
|
|
cDeveloper = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
documentation = {
|
|
enable = true;
|
|
dev.enable = true;
|
|
doc.enable = false;
|
|
info.enable = false;
|
|
man = {
|
|
enable = true;
|
|
generateCaches = false;
|
|
man-db.enable = false;
|
|
mandoc.enable = true;
|
|
};
|
|
};
|
|
home-manager.users.${user}.home.sessionVariables = mkIf cfg.cDeveloper {
|
|
# c docs first
|
|
"MANSECT" = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7";
|
|
};
|
|
environment.systemPackages = with pkgs; [
|
|
man
|
|
man-pages
|
|
man-pages-posix
|
|
];
|
|
};
|
|
} |