aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/lib/eval-config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/lib/eval-config.nix')
-rw-r--r--nixpkgs/nixos/lib/eval-config.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixpkgs/nixos/lib/eval-config.nix b/nixpkgs/nixos/lib/eval-config.nix
index 77490ca3762..9892d6f160f 100644
--- a/nixpkgs/nixos/lib/eval-config.nix
+++ b/nixpkgs/nixos/lib/eval-config.nix
@@ -41,6 +41,12 @@ let
# default to the argument. That way this new default could propagate all
# they way through, but has the last priority behind everything else.
nixpkgs.system = lib.mkDefault system;
+
+ # Stash the value of the `system` argument. When using `nesting.children`
+ # we want to have the same default value behavior (immediately above)
+ # without any interference from the user's configuration.
+ nixpkgs.initialSystem = system;
+
_module.args.pkgs = lib.mkIf (pkgs_ != null) (lib.mkForce pkgs_);
};
};