doc: add code comment clarifying the meaning of legacyPackages

authored by Luc Perkins and committed by helbling.dev 0c738e2e 1cecfb54

+9
+9
flake.nix
··· 45 45 }).nixos.manual.x86_64-linux; 46 46 }; 47 47 48 + # The "legacy" in `legacyPackages` doesn't imply that the packages exposed 49 + # through this attribute are "legacy" packages. Instead, `legacyPackages` 50 + # is used here as a substitute attribute name for `packages`. The problem 51 + # with `packages` is that it makes operations like `nix flake show 52 + # nixpkgs` unusably slow due to the sheer number of packages the Nix CLI 53 + # needs to iterate through. But when the Nix CLI sees a `legacyPackages` 54 + # attribute it displays `omitted` instead of iterating through all 55 + # packages, which keeps `nix flake show` on Nixpkgs reasonably fast, 56 + # though less information rich. 48 57 legacyPackages = forAllSystems (system: import ./. { inherit system; }); 49 58 50 59 nixosModules = {