Hi, this is a feature suggestion that would apply to the package metadata in nixpkgs as well as a frontend tweak in search.nixos.org.
I recently tried to run gpu-screen-recorder-gtk on my system via nix run so that I could record my screen. Turns out, this package doesn’t work if you install it via systemPackages or nix run/nix shell like I did, but rather requires to be configured via options via programs.gpu-screen-recorder.enable to do the necessary system-wide tweaks.
I’ve heard that it’s always better to use options to configure apps, but this made me wonder:
If I can’t guarantee that an app installed without options (“without options” being referred to “standalone” in this post) is going to work properly, should I always have to look up options first and then the app?
My friend found this in the manual (the first note):
Some packages require additional global configuration such as D-Bus or systemd service registration so adding them to
environment.systemPackagesmight not be sufficient. You are advised to check the list of options whether a NixOS module for the package does not exist.
Since the existance of a package is necessary for the NixOS module to work, so the option, shouldn’t packages be marked if they only work when configured via the options or if it can also be installed standalone?
I’d like to propose that all packages are marked with a new metadata field (e.g. standalone_status) that has the following options for this:
unknown: the default value unless the developer changes itbroken: it doesn’t work when installed on its own, likegpu-screen-recorder-gtkexperimental: the maintainer hasn’t tested this extensively, and/or maintains the package while focusing on a config with the optionsfunctional: the package fully works when installed standalone
It sounds like a good idea to display this information in search.nixos.org in some way so that the users know which package will “just work”.
I think it also makes sense to throw a warning when evaulating packages with the status broken, and possibly experimental in the terminal, i.e.:
$ nix shell nixpkgs#gpu-screen-recorder-gtk
Warning: gpu-screen-recorder-gtk has standalone status "broken", and thus should be configured in the options to work properly
$
This makes sense to me as a Nix/NixOS user who relies on search.nixos.org. Note that I’m not a NixOS maintainer.
I look forward to the discussion.
Best regards,
Luka