I search here programs.command-not-found.enable - MyNixOS
then enable in /etc/nixos/configuration.nix
sudo nix-channel --update
[nix@nixos:~]$ htop
The program 'htop' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p htop
nix-shell -p htop-vim
[nix@nixos:~]$ export NIX_AUTO_RUN=1
[nix@nixos:~]$ export NIX_AUTO_RUN_INTERACTIVE=1
[nix@nixos:~]$ htop
Select a package that provides 'htop':
[1]: htop
[2]: htop-vim
Your choice [1-2]: ^C
[nix@nixos:~]$