about summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com>2020-03-13 09:58:10 +0100
committerGitHub <noreply@github.com>2020-03-13 09:58:10 +0100
commit7b15d6cee4839c5ef2e3a9fea355b6007f008820 (patch)
tree58fab3d31d9b48cfda31cbaa4113f1dd6d3e43c3 /nixos/lib
parentb6ae8193edd5fb5188565d6163c86e76a096a500 (diff)
parentce416779bbb5d86210cbf2cc5060cc81faf53c94 (diff)
downloadnixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar.gz
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar.bz2
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar.lz
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar.xz
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.tar.zst
nixlib-7b15d6cee4839c5ef2e3a9fea355b6007f008820.zip
Merge pull request #81241 from thefloweringash/nesting-system
nixos/activation: propagate system to nested configurations
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/eval-config.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix
index 77490ca3762a..9892d6f160f7 100644
--- a/nixos/lib/eval-config.nix
+++ b/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_);
     };
   };