summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-05 14:16:33 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-05 14:53:27 +0200
commitab49ebe6fa2f502844cc6f655f02b00c052c6dd0 (patch)
tree5278821c4a453769c7b3492504dc969cacc7a4c9 /nixos/modules
parent5e5df88457d6a44da9e2856b82a51573aaa0d1da (diff)
downloadnixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar.gz
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar.bz2
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar.lz
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar.xz
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.tar.zst
nixpkgs-ab49ebe6fa2f502844cc6f655f02b00c052c6dd0.zip
Make it possible to disable "info"
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/system-path.nix3
-rw-r--r--nixos/modules/module-list.nix3
-rw-r--r--nixos/modules/profiles/minimal.nix1
-rw-r--r--nixos/modules/programs/info.nix30
4 files changed, 33 insertions, 4 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 3587f8c643b..775d0c39c4f 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -38,7 +38,6 @@ let
       pkgs.strace
       pkgs.su
       pkgs.time
-      pkgs.texinfoInteractive
       pkgs.utillinux
       pkgs.which # 88K size
     ];
@@ -105,7 +104,6 @@ in
         "/etc/xdg"
         "/etc/gtk-2.0"
         "/etc/gtk-3.0"
-        "/info"
         "/lib" # FIXME: remove and update debug-info.nix
         "/sbin"
         "/share/applications"
@@ -113,7 +111,6 @@ in
         "/share/doc"
         "/share/emacs"
         "/share/icons"
-        "/share/info"
         "/share/menus"
         "/share/mime"
         "/share/nano"
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 27fbe55cd42..c6eec6adb3b 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -66,8 +66,9 @@
   ./programs/command-not-found/command-not-found.nix
   ./programs/dconf.nix
   ./programs/environment.nix
-  ./programs/freetds.nix
   ./programs/fish.nix
+  ./programs/freetds.nix
+  ./programs/info.nix
   ./programs/kbdlight.nix
   ./programs/light.nix
   ./programs/man.nix
diff --git a/nixos/modules/profiles/minimal.nix b/nixos/modules/profiles/minimal.nix
index 5a7428e6474..b047b706365 100644
--- a/nixos/modules/profiles/minimal.nix
+++ b/nixos/modules/profiles/minimal.nix
@@ -13,4 +13,5 @@ with lib;
   services.nixosManual.enable = mkDefault false;
 
   programs.man.enable = mkDefault false;
+  programs.info.enable = mkDefault false;
 }
diff --git a/nixos/modules/programs/info.nix b/nixos/modules/programs/info.nix
new file mode 100644
index 00000000000..be6439dca5a
--- /dev/null
+++ b/nixos/modules/programs/info.nix
@@ -0,0 +1,30 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+  options = {
+
+    programs.info.enable = mkOption {
+      type = types.bool;
+      default = true;
+      description = ''
+        Whether to enable info pages and the <command>info</command> command.
+      '';
+    };
+
+  };
+
+
+  config = mkIf config.programs.info.enable {
+
+    environment.systemPackages = [ pkgs.texinfoInteractive ];
+
+    environment.pathsToLink = [ "/info" "/share/info" ];
+
+    environment.extraOutputsToInstall = [ "info" ];
+
+  };
+
+}