I am making some first steps with nix on Debian12 with Gnome and, no surprise, have a ton of ???.
Maybe I am not doing this even remotely as intended, so please feel free to advise me of misconceptions on my end.
For now I am not yet interested in ephemeral environments (which I believe come with nix-shell).
What I did as a first step was installing some packages with nix-env. nix-env -iA nixpkgs.brave
I can find brave in my PATH and I can run it from the command line. However I would prefer to press SUPERKEY type brave and be able to select it. I believe a .desktop file is required for this to work.
Do I have to put that somewhere in order to Gnome finding that manually? I would expect that something like this was handled by a package manager on installation though
I believenix-env has symlinked that to ~/.nix-profile/share/applications. If you set XDG_DATA_DIRS="$XDG_DATA_DIRS:~/.nix-profile/share" in your env vars early enough for gnome to notice these kinds of things should just work.
That said, once you’ve made it past initial experimentation and want to use nix as a serious package manager, I’d recommend switching away from nix-env and using something like home-manager. That would then also solve little integration problems like this.
nix-env has many serious issues that make it problematic as a package manager in the long run, you really need a more user friendly layer (like home-manager) on top to make it not be a footgun.
so you seem to suggest to rather leave nix-env aside. For my understanding, does it still have serious issues, and will become better as time goes by, or is nix-env to be regarded as a dead end ?
I think this is the crux of your question; nix-env is part of the 1.0 CLI, it already has a replacement with better semantics, so it is unlikely to ever see the work it needs to be fit for purpose.
Whether the replacement will ever actually see the light of day is a different question, hence I recommend home-manager for the moment.