From 9d369c75ce2fdeb296ad42bcdc8c1a523c494550 Mon Sep 17 00:00:00 2001 From: mainrs <5113257+mainrs@users.noreply.github.com> Date: Wed, 2 Feb 2022 22:35:28 +0100 Subject: [PATCH] man: add package option (#2688) Closes #2634 --- modules/programs/man.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/programs/man.nix b/modules/programs/man.nix index b235b02fe..f3134b37b 100644 --- a/modules/programs/man.nix +++ b/modules/programs/man.nix @@ -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.