Add apt "Label" to hosted apt repositories

We have a number of “hosted” repositories that contain custom .deb packages that we host. It is pretty straight forward to set these up in Nexus; however, when you want to specify any apt preferences based on identifying labels of these repositories, we’re unable to do so because the default properties of the hosted repository are pretty basic:

They contain the Archive, Codename, and Component. These properties are pretty generic and are a subset of almost all other public repositories. However, there are other properties such as Label that allow for more unique identification to be used. This is very helpful when trying to prioritize repositories within nexus (using apt_preferences).

In other words, I’d like to be able to set the properties so that when I run apt-cache policy I see the label property populated with a label added in the hosted repo settings in Nexus.

I tried doing this by using the full URL for the repository within our nexus setup (e.g. nexus.internal.com/repository/apt-custom-repo`) but that doesn’t work since all are behind the same domain. Since we proxy all repositories (both hosted and proxy) through our nexus domain, we’re unable to specify the repository by URL.