Can't create symlinks declaratively using home-manager

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.luamodules/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!

EDIT:
It seems to be my mistake. I realised after 30 minutes of searching solutions online and after posting this question.
There is a small mistake in the path that I gave.
I used ./config instead of ./.config. There was a config/nvim/init.lua file in the home directory.