ops/nixos: inject depot overlays into NIX_PATH as well

#121
Opened by sterni at 2021-04-20T10·45+00

After [cl/3047](https://cl.tvl.fyi/c/depot/+/3047/), we make sure that pkgs for the configuration build comes from depot.third_party.nixpkgs with the overlays applied. However nix.nixPath only sets nixpkgs to pkgs.path which won't apply the overlays we have.

We'd need to set nixpkgs-overlays in NIX_PATH as well to correct this.

  1. Is this even possible? The overlays are added as functions which are part of the depot eval, can that somehow be done in nixpkgs-overlays? (e.g. with an expression?)

    tazjin at 2021-08-26T18·56+00

  2. nixpkgs-overlays may either be a directory with *.nix files or a .nix file itself that can be imported directly, so you're right our overlays would not just work. Instead we'd need to do some extra plumbing by adding an indirection which handles the readTree-compatible imports.

    sterni at 2021-08-26T19·04+00