From f667e947529239f5b748d2e695ba299eac7c7494 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 9 Jan 2008 16:08:15 +0000 Subject: [PATCH] Now configuration.nix is copied into shared. svn path=/nixos/trunk/; revision=10105 --- default.nix | 3 ++- system/system.nix | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 09c9a1569d88..481202b75caf 100644 --- a/default.nix +++ b/default.nix @@ -4,7 +4,8 @@ let let env = builtins.getEnv "NIXOS_CONFIG"; in if env == "" then /etc/nixos/configuration.nix else env; - system = import system/system.nix {configuration = import configFileName;}; + system = import system/system.nix {configuration = import configFileName; + inherit configFileName; }; in diff --git a/system/system.nix b/system/system.nix index 9b655e0a4956..d159458701f1 100644 --- a/system/system.nix +++ b/system/system.nix @@ -1,6 +1,7 @@ { platform ? __currentSystem , stage2Init ? "" , configuration +, configFileName ? "" }: rec { @@ -246,7 +247,10 @@ rec { ++ pkgs.lib.optional (config.networking.defaultMailServer.directDelivery) pkgs.ssmtp ++ pkgs.lib.concatLists (map (job: job.extraPath) upstartJobs.jobs) ++ (config.environment.extraPackages) pkgs - ++ pkgs.lib.optional (config.fonts.enableFontDir) fontDir; + ++ pkgs.lib.optional (config.fonts.enableFontDir) fontDir + ++ pkgs.lib.optional (configFileName != "" ) + (pkgs.runCommand "configuration" {} '' mkdir -p $out/share && cp "${configFileName}" $out/share/configuration.nix '') + ; # We don't want to put all of `startPath' and `path' in $PATH, since