-
|
Hi, I have been using nixcats using the lazy template, but I would now like to remove lazy.nvim completely using the neovim wrapper from nix-wrapper-modules. I am trying to implement this as a home-manager module. I am running home-manager as a module of nixos. I started using the code from https://birdeehub.github.io/nix-wrapper-modules/md/getting-started.html#nixos-home-manager-and-friends along with code from the neovim template at https://github.com/BirdeeHub/nix-wrapper-modules/tree/main/templates/neovim At first I had a lot of errors, so I decided to get it working with a minimal example first. Here is the code I managed to get working: So, it works using I get the following error: I get the same error if I add Now, I am sure I am making a silly mistake here, can anyone help me solve this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 12 replies
-
|
Hey, I'm running into a similar issue trying to migrate from nixCats. I'm not a Nix expert by any means, but as far as I can see the problem is caused by setting One other idea I had was to use the top-level |
Beta Was this translation helpful? Give feedback.
-
|
Oh! yep That is probably it. extraPackages is not something defined on the specs by default. You have to do that yourself. You can add anything you want to those specs, but the things you pass need to be valid It is mentioned in the neovim Tips and Tricks section, and also it is shown in the template! nix-wrapper-modules/templates/neovim/module.nix Lines 167 to 202 in dc51840 In the above template, using the created extraPackages on the specs will allow you to enable or disable packages alongside those specs, as the values from config.specCollect have been filtered already. config.specMods = {
options.extraPackages = lib.mkOption {
type = lib.types.listOf wlib.types.stringable;
default = [ ];
description = "a extraPackages spec field to put packages to suffix to the PATH";
};
};
config.extraPackages = config.specCollect (acc: v: acc ++ (v.extraPackages or [ ])) [ ]; |
Beta Was this translation helpful? Give feedback.
-
|
Ah, I was a bit impatient and didn't read the entire thing, my bad. This makes a lot more sense now. Thanks a lot for the help! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for chiming in, I think you pointed out what was wrong for the other user too. I had only skimmed it and had not noticed yet but you pointed it out well. |
Beta Was this translation helpful? Give feedback.
-
|
Happy to continue the discussion here, but I haven't been having any such issues so I figure it would be best to continue the discussion here if needed. |
Beta Was this translation helpful? Give feedback.
-
|
One more question: is this code necessary, or does the module take care of it already?... Regarding the |
Beta Was this translation helpful? Give feedback.
I think just take
wlibas a parameter in the module. Now that I look at it, if you do that you should probably also have config there (but if I understand how modules work correctly it should be fine either way). Something like