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

[nixpkgs] default to constructing our own instnace #2839

Open
MattSturgeon opened this issue Jan 16, 2025 · 1 comment
Open

[nixpkgs] default to constructing our own instnace #2839

MattSturgeon opened this issue Jan 16, 2025 · 1 comment
Labels
tech debt Related to technical debt and/or refactoring

Comments

@MattSturgeon
Copy link
Member

#2738 introduced nixpkgs.useGlobalPackages which currently defaults to true, however it should really default to false.

Motivation

  • Using a nixpkgs from our flake.lock will reduce mismatched pkgs version errors
  • Using an internally constructed nixpkgs instance allows users to configure config, overlays, etc as nixvim module options

Issues

This is a breaking change, especially if users have configured config, overlays, etc outside of Nixvim and expect that config to be inherited by nixvim.

Deprecation

I don't know an obnoxious way to warn users the default value will/has change.

Currently the plan is documented as a literalMD default-text.

Pre-migration, we could warn if users have not explicitly defined the option (i.e. highestPrio == 1500). This would be a very visible and obnoxious warning, and would require users to explicitly define an option they probably don't care about.

Post-migration, we could warn if users have explicitly overridden the default to be false. This would notify users that have migrated early they no longer need to do so explicitly, however it is a bit heavy handed.

@MattSturgeon MattSturgeon added the tech debt Related to technical debt and/or refactoring label Jan 16, 2025
@khaneliman
Copy link
Contributor

I was thinking about this recently, actually, and I agree. While working on refactoring my neovim flake and playing around with inputs, passing pkgs, and using nixpkgs.pkgs. It felt like it would be really easy to cause the package mismatches we've been seeing lots of issues around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Related to technical debt and/or refactoring
Projects
None yet
Development

No branches or pull requests

2 participants