That sounds fun!
can be used to find packages with .desktop files
fzf (dmenu/rofi/fuzzel/…)
can be used to select which desktop app to try
bubblewrap (or whatever)
can be used to help sandbox and keep it from polluting $HOME.
Here is a junky little script using flakes
to gist a “demo menu” with around 2500 entries:
#!/usr/bin/env -S nix shell nixpkgs#bash nixpkgs#nix nixpkgs#fzf nixpkgs#bubblewrap github:Mic92/nix-index-database#default --command bash
set -euo pipefail
APPS=$(nix-locate --minimal --regex '/share/applications/.*\.desktop$' \
| sed 's/\.out$//;/(.*)/d' \
| sort -u)
SELECTION=$(fzf --border \
--reverse \
--prompt='Demo Application: ' \
<<< "$APPS")
# tighten the sandbox to what you need
# $HOME is tmpfs to the app so it puts its trash into a trash can
bwrap --dev-bind / / \
--tmpfs "$HOME" \
nix --experimental-features 'nix-command flakes' \
run nixpkgs#"$SELECTION"