Custom packages from overlay not found

Hello again,
I’ve been wanting to add a custom package for a project I contribute to to my system (at least until it’s mature enough to be published in nixpkgs). I tried to follow the wiki page and put this in my configuration.nix:

    overlays = [
      (self: super: {
        my-custom-ide = super.callPackage ./overlays/my-eclipse.nix { };

Within my-eclipse.nix I just define a stdenv.mkDerivation (never tried that before but I’ll spare you the full paste for now.

The issue now is that I cannot install the package. I reference it in my configuration.nix like this:

environment.systemPackages = with pkgs; [
  # ...

which yields this error:

Undefined variable ‘my-custom-ide’ at /etc/nixos/configuration.nix:258:5

I thought defining the overlay in nixpkgs.overlays should be enough since the wiki description for adding overlays sounds like this should suffice to use the overlays in my config. Am I missing something there?

Are you sure you’re not just missing the nixpkgs. before the overlays definition there? I’m assuming that’s a paste error.

A full paste of your config would be useful. Depending on how you call your package the overlays may not be included (say, if you import a different nixpkgs). That bit is done right, I can’t read.

assuming you set it as nixpkgs.overlays = [ ... ]; then that should be all that is necessary.

It was indeed a paste error. I accidentally put the overlays definition into nixpkgs.config because I didn’t look hard enough. Thank you very much for your time nonetheless. Without your hints I probably wouldn’t have realized my error. :grinning_face_with_smiling_eyes: