Skip to content

What does this do: programs.nixvim.path? #2066

Closed Answered by MattSturgeon
refaelsh asked this question in Q&A
Discussion options

You must be logged in to vote

It is used for files sub-modules to define where the generated file will be installed. E.g. you can create ftplugins using nixvim modules:

programs.nixvim = {
  enable = true;

  files.foo = {
    path = "ftplugin/python.lua";
    opts.expandtab = true;
  };
};

However in submodules it defaults to name, so usually you just define the attr name:

programs.nixvim = {
  enable = true;

  files."ftplugin/python.lua" = {
    opts.expandtab = true;
  };
};

I can't recall OTTOMH if it is used outside of files submodules, if not we should probably mark it hidden or internal. Either way we could improve its docs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by refaelsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants