From 205a7431accc54aa97807dc8895a983b0d709e5a Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sun, 23 Nov 2008 01:29:20 +0000 Subject: [PATCH] Remove extra arguments comming from config.*. svn path=/nixos/branches/fix-style/; revision=13381 --- boot/boot-stage-1.nix | 7 ++++++- etc/default.nix | 6 +++++- installer/default.nix | 4 +++- system/system.nix | 7 +++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/boot/boot-stage-1.nix b/boot/boot-stage-1.nix index 33fa668e0804..8a5b0a76a3a2 100644 --- a/boot/boot-stage-1.nix +++ b/boot/boot-stage-1.nix @@ -4,7 +4,12 @@ # calls the init in the root file system to start the second boot # stage. -{ pkgs, config, kernelPackages, modulesTree }: +{pkgs, config}: + +let + kernelPackages = config.boot.kernelPackages; + modulesTree = config.system.modulesTree; +in rec { diff --git a/etc/default.nix b/etc/default.nix index 9a168f19f6a1..de5d6bbd9add 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -1,8 +1,12 @@ { config, pkgs, systemPath, wrapperDir -, defaultShell, extraEtc, nixEnvVars, modulesTree, nssModulesPath +, defaultShell }: let + extraEtc = config.environment.etc; + nixEnvVars = config.nix.envVars; + modulesTree = config.system.modulesTree; + nssModulesPath = config.system.nssModules.path; optional = pkgs.lib.optional; diff --git a/installer/default.nix b/installer/default.nix index dfa2ab38eeba..f6f1f9205741 100644 --- a/installer/default.nix +++ b/installer/default.nix @@ -1,7 +1,9 @@ -{pkgs, config, nix}: +{pkgs, config}: let + nix = config.environment.nix; + makeProg = args: pkgs.substituteAll (args // { dir = "bin"; isExecutable = true; diff --git a/system/system.nix b/system/system.nix index b79278d2a72e..659b647829d1 100644 --- a/system/system.nix +++ b/system/system.nix @@ -41,7 +41,7 @@ rec { # The initial ramdisk. initialRamdiskStuff = import ../boot/boot-stage-1.nix { - inherit pkgs config kernelPackages modulesTree; + inherit pkgs config; }; initialRamdisk = initialRamdiskStuff.initialRamdisk; @@ -49,7 +49,7 @@ rec { # NixOS installation/updating tools. nixosTools = import ../installer { - inherit pkgs config nix; + inherit pkgs config; }; @@ -70,8 +70,7 @@ rec { # The static parts of /etc. etc = import ../etc/default.nix { inherit config pkgs systemPath wrapperDir - defaultShell nixEnvVars modulesTree nssModulesPath; - extraEtc = config.environment.etc; + defaultShell; };