1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-18 12:38:30 +02:00

man: add package option (#2688)

Closes #2634
This commit is contained in:
mainrs 2022-02-02 22:35:28 +01:00 committed by GitHub
parent 933b6d97b4
commit 9d369c75ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,8 @@
with lib;
{
let cfg = config.programs.man;
in {
options = {
programs.man = {
enable = mkOption {
@ -15,6 +16,13 @@ with lib;
'';
};
package = mkOption {
type = types.package;
default = pkgs.man;
defaultText = literalExpression "pkgs.man";
description = "The man package to use.";
};
generateCaches = mkOption {
type = types.bool;
default = false;
@ -39,7 +47,7 @@ with lib;
};
config = mkIf config.programs.man.enable {
home.packages = [ pkgs.man ];
home.packages = [ cfg.package ];
home.extraOutputsToInstall = [ "man" ];
# This is mostly copy/pasted/adapted from NixOS' documentation.nix.