From 548fb6a1a589d98d61bbb42750fcaba500be566b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 May 2009 13:15:31 +0000 Subject: [PATCH] * Move the optional parts of the system path to the appropriate modules. svn path=/nixos/branches/modular-nixos/; revision=15791 --- modules/config/fonts.nix | 3 +++ modules/config/nsswitch.nix | 6 ++++++ modules/config/system-path.nix | 16 ++++------------ modules/installer/tools/tools.nix | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/modules/config/fonts.nix b/modules/config/fonts.nix index f03d457a8bc..47e505b3cb5 100644 --- a/modules/config/fonts.nix +++ b/modules/config/fonts.nix @@ -173,4 +173,7 @@ in '' export FONTCONFIG_FILE=/etc/fonts/fonts.conf ''; + + environment.systemPackages = + pkgs.lib.optional config.fonts.enableFontDir config.system.build.x11Fonts; } diff --git a/modules/config/nsswitch.nix b/modules/config/nsswitch.nix index 2a37903f7f3..cac6ff382a4 100644 --- a/modules/config/nsswitch.nix +++ b/modules/config/nsswitch.nix @@ -53,4 +53,10 @@ in LD_LIBRARY_PATH=${config.system.nssModules.path}:$LD_LIBRARY_PATH '' else ""; + + # NSS modules need to be in `systemPath' so that (i) the builder + # chroot gets to seem them, and (ii) applications can benefit from + # changes in the list of NSS modules at run-time, without requiring + # a reboot. + environment.systemPackages = [config.system.nssModules.list]; } diff --git a/modules/config/system-path.nix b/modules/config/system-path.nix index e85382606da..3b2867fbb95 100644 --- a/modules/config/system-path.nix +++ b/modules/config/system-path.nix @@ -7,7 +7,7 @@ with pkgs.lib; let - systemPackages = + requiredPackages = [ config.system.sbin.modprobe # must take precedence over module_init_tools config.system.sbin.mount # must take precedence over util-linux config.environment.nix @@ -58,16 +58,7 @@ let pkgs.utillinux pkgs.wirelesstools (import ../../helpers/info-wrapper.nix {inherit (pkgs) bash texinfo writeScriptBin;}) - ] - ++ pkgs.lib.optional config.services.bitlbee.enable pkgs.bitlbee - ++ config.environment.extraPackages - ++ pkgs.lib.optional config.fonts.enableFontDir config.system.build.x11Fonts - - # NSS modules need to be in `systemPath' so that (i) the builder - # chroot gets to seem them, and (ii) applications can benefit from - # changes in the list of NSS modules at run-time, without requiring - # a reboot. - ++ config.system.nssModules.list; + ] ++ config.environment.extraPackages; options = { @@ -75,7 +66,6 @@ let environment = { systemPackages = mkOption { - default = systemPackages; description = '' The set of packages that appear in /var/run/current-system/sw. These packages are @@ -135,4 +125,6 @@ in { require = [options]; + + environment.systemPackages = requiredPackages; } diff --git a/modules/installer/tools/tools.nix b/modules/installer/tools/tools.nix index b9f643ccca6..2f91ef2c629 100644 --- a/modules/installer/tools/tools.nix +++ b/modules/installer/tools/tools.nix @@ -76,7 +76,7 @@ in { require = options; - environment.extraPackages = + environment.systemPackages = [ nixosInstall nixosRebuild nixosHardwareScan