Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command-not-found executable is not available #29143

Closed
rrnewton opened this issue Sep 9, 2017 · 4 comments
Closed

command-not-found executable is not available #29143

rrnewton opened this issue Sep 9, 2017 · 4 comments

Comments

@rrnewton
Copy link
Contributor

rrnewton commented Sep 9, 2017

Issue description

I see various discussion of command-not-found (#1751, #12044, #11996) discussing how to fix its database, etc, but I have the much more basic problem that I don't have a command-not-found binary on my NixOS system.

I can see where the source is, and I can see that in modules-list.nix it is referenced, so this commit disabling it must no longer apply.

I don't see it listed in the configuration options. I tried adding this to my configuration.nix but I got an error:

config.programs.command-not-found.enable = true;

Steps to reproduce

Fresh install of nixos and then upgrade to unstable channel, 18.03pre114421.799435b7ca (Impala).
Attempt to run command-not-found.

Technical details

  • System: 18.03pre114421.799435b7ca (Impala)
  • Nix version: nix-env (Nix) 1.11.14
  • Nixpkgs version: "18.03pre114421.799435b7ca"
  • Sandboxing enabled: true
@pbogdan
Copy link
Member

pbogdan commented Sep 9, 2017

Could you try with programs.command-not-found.enable = true; (without the config. prefix)? That would seem to be working for me on the same nixpkgs revision.

@rrnewton
Copy link
Contributor Author

rrnewton commented Sep 9, 2017

Thanks! That does the trick. I wonder why it wasn't on by default.

I can't see from where I should have learned that. (It feels like one small example of the oft-discussed discoverability and UX issues, as described in https://github.com/NixfiOS/nix/issues/684 .)

The "Appendix A" does not define this command-not-found option. Should I send a documentation PR that adds it to that appendix?

@pbogdan
Copy link
Member

pbogdan commented Sep 9, 2017

AFAIK the manual hosted on nixos.org is for the stable version of NixOS. You can however browse the manual generated for the current version of your system by running nixos-help command.

@rrnewton
Copy link
Contributor Author

rrnewton commented Sep 9, 2017

Ah, good call, it's already there! All is in order.

@rrnewton rrnewton closed this as completed Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants