From 93cfbb253c2b088272ae36e419694017551c4a17 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 8 Oct 2023 20:39:07 +0300 Subject: [PATCH] eval-config.nix: set nixpkgs.pkgs instead of _module.args.pkgs This allows nixpkgs.overlays to work, and also the nixpkgs.config check. --- nixos/lib/eval-config.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 81a5ea1750de..c00ba1bdc04e 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -34,9 +34,6 @@ evalConfigArgs@ in lib.optional (e != "") (import e) }: -let pkgs_ = pkgs; -in - let inherit (lib) optional; @@ -58,8 +55,9 @@ let nixpkgs.system = lib.mkDefault system; }) ++ - (optional (pkgs_ != null) { - _module.args.pkgs = lib.mkForce pkgs_; + (optional (pkgs != null) { + # This should be default priority, so it conflicts with any user-defined pkgs. + nixpkgs.pkgs = pkgs; }) ); };