Factor out "man" into a separate module and add "man" outputs to system.path

Fixes #10270.
This commit is contained in:
Eelco Dolstra
2015-10-30 14:15:18 +01:00
parent 58e9440b89
commit c20403631d
4 changed files with 35 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
{ 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.
'';
};
};
config = mkIf config.programs.man.enable {
environment.systemPackages = [ pkgs.man ];
environment.pathsToLink = [ "/share/man" ];
environment.outputsToLink = [ "man" ];
};
}