Overlays are very confusing for me, its been a while but still cant figure out what does
self: super:
means, all I know is that it is a function with 2 arguments.
I recommend final: prev
. Thats also easier to explain. The first argument is nixpkgs with your overlay applied, and the second argument is nixpkgs without your overlay. So the “final” nixpkgs and the “previous” nixpkgs. This allows you to access things you defined in your overlay along with things from nixpkgs itself.
final: prev: { f = final.firefox; }
would work, but final: prev: { f = prev.firefox; }
would make more sense.
This could be useful:
final: prev: {
firefox = prev.firefox.override { ... };
myBrowser = final.firefox;
}
And final: prev: firefox = final.firefox.override { ... };
would cause infinite recursion.