From 79a51b0cf3e9fb27c098b15eada512aaf9edc7de Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Sun, 4 Jan 2015 15:40:59 +0100 Subject: Add Type information into manual and manpages, fixes #4600 --- lib/options.nix | 1 + nixos/doc/manual/default.nix | 3 ++- nixos/doc/manual/options-to-docbook.xsl | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 939f9948ceef..eed43daaeccf 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -96,6 +96,7 @@ rec { declarations = filter (x: x != unknownModule) opt.declarations; internal = opt.internal or false; visible = opt.visible or true; + type = opt.type.name or null; } // (if opt ? example then { example = scrubOptionValue opt.example; } else {}) // (if opt ? default then { default = scrubOptionValue opt.default; } else {}) diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index b0a755c6a6fc..fdfeb5ca07c1 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -20,7 +20,8 @@ let declarations = map (fn: stripPrefix fn) opt.declarations; } // optionalAttrs (opt ? example) { example = substFunction opt.example; } - // optionalAttrs (opt ? default) { default = substFunction opt.default; }); + // optionalAttrs (opt ? default) { default = substFunction opt.default; } + // optionalAttrs (opt ? type) { type = substFunction opt.type; }); prefix = toString ../../..; diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl index e81a1dc356e1..af9eb0e48fb0 100644 --- a/nixos/doc/manual/options-to-docbook.xsl +++ b/nixos/doc/manual/options-to-docbook.xsl @@ -34,6 +34,14 @@ select="attr[@name = 'description']/string/@value" /> + + + Type: + + + + + Default: -- cgit 1.4.1