diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-05-12 22:11:13 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-05-12 22:17:38 +0200 |
| commit | b6af291c84da5970d9db165c6cb2834455dc04e8 (patch) | |
| tree | daef5b7b940d4dd546e55bae6297868280e26faa /modules | |
| parent | 1546ea0617e4219612f08c6cd933fb0df2680ca6 (diff) | |
add programs.man module
Note: this doesn't add man to systemPackages by default,
only man-old builds on darwin and the system version works fine.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/environment/default.nix | 2 | ||||
| -rw-r--r-- | modules/programs/man.nix | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/modules/environment/default.nix b/modules/environment/default.nix index 09a3185..dced0a5 100644 --- a/modules/environment/default.nix +++ b/modules/environment/default.nix @@ -51,7 +51,7 @@ in { environment.extraOutputsToInstall = mkOption { type = types.listOf types.str; - default = [ "man" ]; + default = []; example = [ "doc" "info" "devdoc" ]; description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>."; }; diff --git a/modules/programs/man.nix b/modules/programs/man.nix new file mode 100644 index 0000000..949e393 --- /dev/null +++ b/modules/programs/man.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + options = { + + programs.man.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable manual pages and the <command>man</command> command. + This also includes "man" outputs of all <literal>systemPackages</literal>. + ''; + }; + + }; + + + config = mkIf config.programs.man.enable { + + environment.pathsToLink = [ "/share/man" ]; + + environment.extraOutputsToInstall = [ "man" ]; + + }; +} |
