You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extraLuaConfig part is taken from Neovim NixOS wiki, and is expected to read the neovim config I have as a git submodule in home-manager/nvim/init.lua. But, it instead looks for it in /nix/store.
The error in the output of the switch command:
error: getting status of '/nix/store/16ch7mkx4ybbjrxnalknyks8d4mzsahb-source/home-manager/nvim': No such file or directory
git status output:
~/nix-config/ > git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Is there a way to read the config file from home-manager/nvim/init.lua and not from /nix/store?
The text was updated successfully, but these errors were encountered:
Flakes (so, the entire repo) are copied to the nix store before evaluation happens, so any relative paths are actually relative to the flake copy existing in the store (in that particular evaluation, /nix/store/16ch7mkx4ybbjrxnalknyks8d4mzsahb-source), this is by design.
The actual issue, though, is that submodules are not copied by default, there's a few workarounds for that: NixOS/nix#6633
Overall, I don't recommend using submodules, you might want to add your neovim config repo as a non-flake input, perhaps? You can fetch any repository this way, it being a flake or not. Another alternative would be to simply fetch your other repo with fetchFromGitHub and friends.
That was the information I didn't know, and the solution for me was to use .?submodules=1#username@hostname on rebuild. As of to use submodules or not, thanks for pointing the alternatives out, I'm sure I'll find use for them soon. :)
Thanks for creating these beautiful configs, by the way. Starting out with the minimal one right now, the experience is great!
I have the following lines in my
home-manager/home.nix
:The
extraLuaConfig
part is taken from Neovim NixOS wiki, and is expected to read the neovim config I have as a git submodule inhome-manager/nvim/init.lua
. But, it instead looks for it in/nix/store
.The error in the output of the switch command:
error: getting status of '/nix/store/16ch7mkx4ybbjrxnalknyks8d4mzsahb-source/home-manager/nvim': No such file or directory
git status
output:Is there a way to read the config file from
home-manager/nvim/init.lua
and not from/nix/store
?The text was updated successfully, but these errors were encountered: