I am trying to create a home-manager module for neovim.
My initial attempt to use the init.lua file was by using the programs.neovim.extraConfig = builtins.readFile ./init.lua;
option but this would read the lua as a regular Vimscript file.
The solution to this was to create a symlink: $HOME/.config/nvim/init.lua
→ modules/neovim/init.lua
I tried doing this by using the home.file option:
file."./config/nvim/init.lua".source = ./modules/neovim/init.lua;
this however didn’t create the file even if I didn’t get any such errors when I ran home-manager switch --flake .#currentuser
.
Any idea regarding the problem, would be appreciated. Thank you!