Referring to current attribute set key

It’s a bit hard to explain so here is an example:

firefox = {
  enable = true;
  profiles =  {
    default = { # <- same name
      id = 0;
      extensions = firefox-addons.default; # <- same name
    };
  };
};

I would like to index the firefox-addons attribute set using the same name as the current attribute set key. I think I can make a function for this, but is there a more idiomatic or simple way to do this?