How could I create a Neovim flake that's bundled with an applied config?

Meaning, suppose I have a directory my-nvim which includes a flake.nix file, and a config/lua+config/nvim directory, which contains a legal Neovim (nightly) configuration: Would I be able to create a flake.nix such that when I execute nix run .#nvim, a Neovim instance with the aforementioned config applied is run?

I have a feeling this is probably where some sort of overlay would come in, but i’m not entirely fluent with them yet, and am overall uncertain as to what kind of attributes/overall-structure would need to be invoked.


the plugin attribute got reverted but this can give you an idea how to do it [WIP] provide default configs by teto · Pull Request #112 · nix-community/neovim-nightly-overlay · GitHub

1 Like