Make it possible to disable "info"

This commit is contained in:
Eelco Dolstra 2016-09-05 14:16:33 +02:00
parent 5e5df88457
commit ab49ebe6fa
4 changed files with 33 additions and 4 deletions

View File

@ -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"

View File

@ -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

View File

@ -13,4 +13,5 @@ with lib;
services.nixosManual.enable = mkDefault false;
programs.man.enable = mkDefault false;
programs.info.enable = mkDefault false;
}

View File

@ -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" ];
};
}