Factor out "man" into a separate module and add "man" outputs to system.path
Fixes #10270.
This commit is contained in:
30
nixos/modules/programs/man.nix
Normal file
30
nixos/modules/programs/man.nix
Normal 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" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user