Changing Application Categories for existing packages

Hello, I am new to Nix and probably missing something obvious. I however couldn’t find anything about it, other than packaging desktop files for new packages.

My question is, how do I change the category of an application so it will show up under the right category in the menu of GNOME or Budgie (or any other DM for that matter). I figure this would be in the nix configuration somehow and not in ~/.local/share/applications

I am currently not using anything like flakes or home manager. Just trying to keep it basic for now.
I am using NixOS 23.11 stable.

The result should be that the application that is currently under ‘Other’ in the menu, will be visible under ‘Office’.

I found this post Is there any way to modify an application's .desktop file? but that does not really answer the question how to do this in a declarative manner.

Thanks in advance or any help!