-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Nix flake input ignored when using nixvim with home-manager and NixOS #333
Comments
After discussing with other home-manager contributors, it seems that we should keep on with the current behavior. Hence, we have decided to adopt the following approach: The |
Thought about writing here instead of opening a new issue. I there a way to get the effect you are mentioning? I'd like to keep my system on stable and only let nixvim use unstable packages. Almost got it working using overlays to have the missing packages from unstable in nixpkgs. But some parts of the code use new lib features from unstable so it wasn't enough. Right now I am using HM and NixOS with flakes. |
If you're willing to build a standalone config you can use whichever |
I tried using the makeNixvimWithModule function without success, it's giving me an error I can't find much info on. nvim = nixvim.legacyPackages.${system}.makeNixvimWithModule {
pkgs = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
module = {
config = {
luaLoader.enable = true;
};
};
};
Though this might be something that will require it's own issue then. |
If you generate an external config in it's own flake with:
Then you can treat that as its own separate project with its own set of flake inputs. To use it in your NixOS configuration you can add it as a flake input to your NixOS flake and you can grab the derivations from the external flake (something like |
I wrote a small guide here: https://gist.github.com/siph/288b7c6b5f68a1902d28aebc95fde4c5 |
Thank you very much for this guide ! |
Sure. |
When using the nixvim HM/NixOS modules, the
nixpkgs
input of the flake is ignored in favor of whatever version ofnixpkgs
is used by home-manager (or NixOS).This has annoying consequences:
nixpkgs
or who did not updated his flake's inputs recently enough can suffer from bugs.Example: error: attribute 'typst-lsp' missing #332
nixpkgs
, and the latter contains vim plugins updates which are not compatible with nixvim can suffer from breakage/deprecation warnings.Ideally, we would like nixvim to use its own
nixpkgs
input. This can let us (nixvim maintainers) pinnixpkgs
to a version we know works and only update it carefully after some testing.Users could still override this (at their own risk) by setting for instance
inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs";
.Note: when using the standalone nixvim wrapper, the behavior is correct. The problem is only present for the HM and NixOS modules.
The text was updated successfully, but these errors were encountered: