Closed shot-codes closed 4 months ago
Nice catch!
You are importing Neovim Nix file as a Home Manager module, not as a NixOS module. I'm doing NixOS-level imports for... perhaps not great reasons, but yeah. This is where you import the HM module:
https://github.com/shot-codes/nix/blob/c1777ea48f9b76844fe2f2862041704ad95beb8b/flake.nix#L51
HM modules get config
argument scoped to the HM modules, and NixOS modules get, uhh, global (?) scope. The config
argument you have in HM modules can only access the HM modules, and can't access NixOS modules. home-manager.users.shot
is a NixOS module path; HM module path would be programs.neovim.finalPackage.passthru.packpathDirs
, which can also be accessed by home-manager.users.shot.programs.neovim.finalPackage.passthru.packpathDirs
as a NixOS module.
So long story short, you need to use the correct scope here, which you can do in either of those two ways:
config
to osConfig
; osConfig
is an argument for HM modules that contains the config
for NixOS modulesconfig.home-manager.users.shot.programs.neovim.finalPackage.passthru.packpathDirs
to config.programs.neovim.finalPackage.passthru.packpathDirs
; you are already scoped into home-manager.users.shot
, so there's no actual need to reference it againThis helped me a lot too. Thank you for asking the question shot-codes and thanks for the thorough solution KFearsoff!
Haha glad I could help. I ended up switching to nixvim and have been too busy to stay on top of my created github issues. I'll go ahead and close the issue since I am no longer in a position to try the fix and I'm confident from your response KFearsoff that this will work if I try again in the future, it seems to have worked for evanaze :) <3
Heya, I've been struggling trying to get lazyvim lsps working in nixos at all and came across your own config. I've made a minimal setup emulating yours following your guide but something is going wrong when trying to inform lazy of the package directory. Any tips to help me figure out why I don't have
home-manager
inconfig
would be much appreciated :)