-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Flake setups are not reliably detected #210
Comments
Would it make more sense if command-not-found.sh looks at the enabled experimental features instead? |
Maybe; I can see people using e.g. https://github.com/DeterminateSystems/nix-installer with a conventional non-flakes setup and getting unexpected results because of the defaulted-on experimental feature. Not sure if that's worth worrying about though. Is there an easy way to check the experimental features without trying to parse |
One possibility would be to check if "nix registry list" is successful? |
we can run |
but that will break if flakes is no longer an experimental feature, right? |
yeah that's true, though I'm a bit worried that |
true, so let's check for nix show-config experimental-features and later add a version check if nix ever makes flakes support non-experimental? |
sounds good to me, and we can just do a |
For what it's worth it seems like
(Though I find command-not-found already a bit too slow for my tastes, so up to you whether that is reason to avoid making it worse or a reason it's not that big of a deal.) |
Just opened #227 to rewrite command-not-found.sh in rust, hoping to improve a few things including this one the new flakes detection logic parses the nix config file and looks for |
I have an all-flakes nix-darwin/home-manager setup but the
command-not-found.sh
script gives menix-shell
output. It seems like I have no user profile to look for amanifest.json
in:I'm not sure what a reliable way to detect a flakes setup is, though.
The text was updated successfully, but these errors were encountered: