diff --git a/modules/default.nix b/modules/default.nix
index d43831ee..1b1d97a6 100644
--- a/modules/default.nix
+++ b/modules/default.nix
@@ -31,6 +31,7 @@ let
./programs/htop.nix
./programs/info.nix
./programs/lesspipe.nix
+ ./programs/man.nix
./programs/rofi.nix
./programs/ssh.nix
./programs/termite.nix
diff --git a/modules/misc/news.nix b/modules/misc/news.nix
index 18c7f9a8..c7be03c8 100644
--- a/modules/misc/news.nix
+++ b/modules/misc/news.nix
@@ -328,6 +328,16 @@ in
will be set only on zsh launch.
'';
}
+
+ {
+ time = "2017-10-15T13:59:47+00:00";
+ message = ''
+ A new module is available: 'programs.man'.
+
+ This module is enabled by default and makes sure that manual
+ pages are installed for packages in 'home.packages'.
+ '';
+ }
];
};
}
diff --git a/modules/programs/man.nix b/modules/programs/man.nix
new file mode 100644
index 00000000..702b8932
--- /dev/null
+++ b/modules/programs/man.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ options = {
+ programs.man.enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether to enable manual pages and the man
+ command. This also includes "man" outputs of all
+ home.packages.
+ '';
+ };
+ };
+
+ config = mkIf config.programs.man.enable {
+ home.packages = [ pkgs.man-db ];
+ home.extraOutputsToInstall = [ "man" ];
+ };
+}