-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
modules/misc: nixpkgs module #1784
Comments
Originally commented on #1800 (comment) Looks like the way home-manager handles the "default" Meaning they use a fresh instance, with its own config/overlays, but matching the same locked channel. Unless these nixos module options are used:
I believe when home-manager is used standalone, it sets It might do the same thing when it's a NixOS module, or it might use |
I think this is the reason why it won't build successfully for me in my configuration tied to nix-darwin, nixos, home-manager. |
It's hard to know exactly what you're saying without seeing the error messages you're referencing, but if you're saying that you've been having mismatched nixpkgs issues on your nix-darwin + nixvim setup I have some good news: The initial stages of this feature were recently merged, you can now define In the future we'd like to have more options for constructing a pkgs instance internally, and perhaps even defaulting to the channel lock from our flake inputs instead of our current behaviour of defaulting to the |
Wait so does that mean I can specify:
now? |
No, that can't be supported as we rely on packages present in unstable nixpkgs on our master. You still need to use nixvim's stable branch if you want to use a stable nixpkgs. |
Awesome. Nixvim now builds with my stable system, using unstable packages for nixvim. 👏👏 |
NixOS1, home-manager2 and nix-darwin3 all have a
nixpkkgs
module where thepkgs
passed to modules can be configured or overridden.This can be used to specify a specific lock or channel, and it can be used to define
overlays
and config such asenableUnfree
.Configuring
pkgs
is also useful for cross-compiliation (by settinghostPlatform
andbuildPlatform
).Currently this is not possible in standalone nixvim builds, instead
pkgs
must be configured before passing it tomakeNixvimWithModule
.This would also make it possible to have nixvim's
pkgs
be different to that used by the host modules; currently many users are forced to use the standalone build just to use a different nixpkgs channel to their NixOS/home-manager configs.Adding this would also make it easier to add extensions topkgs.lib
via an overlay, such as merging our maintainers intolib.maintainers
or making nixvim's helper lib available as (e.g.)lib.nixvim
.EDIT: done in #1963, but it has to be done as a specialArg because
lib
is passed in bylib.evalModules
.Footnotes
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/nixpkgs.nix ↩
https://github.com/nix-community/home-manager/blob/master/modules/misc/nixpkgs.nix ↩
https://github.com/LnL7/nix-darwin/blob/master/modules/nix/nixpkgs.nix ↩
The text was updated successfully, but these errors were encountered: