@@ -73,8 +73,11 @@
7373 false # Allows us to easily switch on materialization checking
7474 , system, sourcesOverride ? { }, ... }@args: rec {
7575 sources = inputs // sourcesOverride;
76− allOverlays = import ./overlays args;
77− inherit config nixpkgsArgs;
76+ allOverlays = import ./overlays (args // { inherit sources; });
77+ inherit config;
78+ # We are overriding 'overlays' and 'nixpkgsArgs' from the
79+ # flake outputs so that we can incorporate the args passed
80+ # to the compat layer (e.g. sourcesOverride).
7881 overlays = [ allOverlays.combined ]
7982 ++ (if checkMaterialization == true then
8083 [
@@ -86,6 +89,9 @@
8689 ]
8790 else
8891 [ ]);
92+ nixpkgsArgs = {
93+ inherit config overlays;
94+ };
8995 pkgs = import nixpkgs
9096 (nixpkgsArgs // { localSystem = { inherit system; }; });
9197 pkgs-unstable = import nixpkgs-unstable