about summary refs log tree commit diff
path: root/modules/common/common/documentation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common/common/documentation.nix')
-rw-r--r--modules/common/common/documentation.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/common/common/documentation.nix b/modules/common/common/documentation.nix
new file mode 100644
index 0000000..55f6138
--- /dev/null
+++ b/modules/common/common/documentation.nix
@@ -0,0 +1,28 @@
+{
+  config,
+  lib,
+  pkgs,
+  this,
+  ...
+}:
+with lib; {
+  config = mkMerge [
+    (mkIf this.isHeadful {
+      hm.manual = {
+        html.enable = false;
+        json.enable = false;
+        manpages.enable = true;
+      };
+
+      documentation = {
+        enable = true;
+        doc.enable = false;
+        info.enable = false;
+      };
+    })
+    (mkIf this.isHeadless {
+      hm.manual.manpages.enable = false;
+      documentation.enable = false;
+    })
+  ];
+}

Consider giving Nix/NixOS a try! <3