summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-09-08 09:16:41 -0400
committerGitHub <noreply@github.com>2018-09-08 09:16:41 -0400
commitca7391daf235222f220b582d43ffbbf803121779 (patch)
tree12f7c7d639fa44e057574cb1ceb9b15175158719 /nixos/lib
parentbcedf59d84201679939836b5997c024497e10b1d (diff)
parent9f9723b179961e7235d8e808c4ee8eaf52e05086 (diff)
downloadnixlib-ca7391daf235222f220b582d43ffbbf803121779.tar
nixlib-ca7391daf235222f220b582d43ffbbf803121779.tar.gz
nixlib-ca7391daf235222f220b582d43ffbbf803121779.tar.bz2
nixlib-ca7391daf235222f220b582d43ffbbf803121779.tar.lz
nixlib-ca7391daf235222f220b582d43ffbbf803121779.tar.xz
nixlib-ca7391daf235222f220b582d43ffbbf803121779.tar.zst
nixlib-ca7391daf235222f220b582d43ffbbf803121779.zip
Merge pull request #46341 from obsidiansystems/fix-46320
nixpkgs module: Fix defaulting of `localSystem` and `system`
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/eval-config.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix
index d005fc61dc4e..f71e264c3478 100644
--- a/nixos/lib/eval-config.nix
+++ b/nixos/lib/eval-config.nix
@@ -36,7 +36,11 @@ let
     _file = ./eval-config.nix;
     key = _file;
     config = {
-      nixpkgs.localSystem = lib.mkDefault { inherit system; };
+      # Explicit `nixpkgs.system` or `nixpkgs.localSystem` should override
+      # this.  Since the latter defaults to the former, the former should
+      # 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;
       _module.args.pkgs = lib.mkIf (pkgs_ != null) (lib.mkForce pkgs_);
     };
   };