Why does flake.nix import the eval every time?

Reading nixpkgs/flake.nix at 78cb77b29d37a9663e05b61abb4fa09465da4b70 · NixOS/nixpkgs · GitHub I noticed that import ./nixos/lib/eval-config.nix is used 3 times.

Why it wasn’t just assigned like evalConfig = import ./nixos/lib/eval-config.nix in the highest let..in and then used from that name?

Just wondering.


flakes has not yet the “same” (structural) capabilities like standard nix.

This is not related.

In the snippet given, it should totally be possible to have an extra binding between lines 7 and 18.

Though it seems as if this question became irrelevant, as in the last 2 years since this post was created the flake.nix got refactored, such that eval-config.nix is only imported a single time.