summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-30 14:15:18 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-30 15:21:12 +0100
commitc20403631da45ab4eff6dc803d4701da421ad05a (patch)
tree5e0e9228e44074223d620b70400549641d554e7d /nixos/modules/programs
parent58e9440b8983c2e0dbab667dc7944e8af9955a35 (diff)
downloadnixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar.gz
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar.bz2
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar.lz
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar.xz
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.tar.zst
nixlib-c20403631da45ab4eff6dc803d4701da421ad05a.zip
Factor out "man" into a separate module and add "man" outputs to system.path
Fixes #10270.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/man.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/programs/man.nix b/nixos/modules/programs/man.nix
new file mode 100644
index 000000000000..b28506538049
--- /dev/null
+++ b/nixos/modules/programs/man.nix
@@ -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" ];
+
+  };
+
+}