diff --git a/default.nix b/default.nix
index f8fb692a..66c75083 100644
--- a/default.nix
+++ b/default.nix
@@ -44,6 +44,7 @@ let
./modules/services/nix-gc.nix
./modules/programs/bash.nix
./modules/programs/fish.nix
+ ./modules/programs/man.nix
./modules/programs/nix-script.nix
./modules/programs/tmux.nix
./modules/programs/vim.nix
diff --git a/modules/environment/default.nix b/modules/environment/default.nix
index 09a31850..dced0a59 100644
--- a/modules/environment/default.nix
+++ b/modules/environment/default.nix
@@ -51,7 +51,7 @@ in {
environment.extraOutputsToInstall = mkOption {
type = types.listOf types.str;
- default = [ "man" ];
+ default = [];
example = [ "doc" "info" "devdoc" ];
description = "List of additional package outputs to be symlinked into /run/current-system/sw.";
};
diff --git a/modules/programs/man.nix b/modules/programs/man.nix
new file mode 100644
index 00000000..949e393a
--- /dev/null
+++ b/modules/programs/man.nix
@@ -0,0 +1,27 @@
+{ 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 systemPackages.
+ '';
+ };
+
+ };
+
+
+ config = mkIf config.programs.man.enable {
+
+ environment.pathsToLink = [ "/share/man" ];
+
+ environment.extraOutputsToInstall = [ "man" ];
+
+ };
+}