I have a neovim configured using home manager module. I want to share it with my friends as flake input so my friends can use my configuration. And i want to keep neovim configuration in the same repo with my nixos configuration as possible.
Something like this should work (you’ll need to fill in the blanks with the correct values):
Your flake:
{
inputs = { ... };
outputs = { ... }: {
homeModules = {
neovim = ./home-modules/neovim.nix;
};
};
}
Your friend’s flake:
{
inputs = {
home-manager = { ... };
my-friends-flake = { ... };
};
outputs = { home-manager, my-friends-flake, ... }: {
homeConfigurations = home-manager.lib.homeManagerConfiguration {
pkgs = ...;
modules = [
./home-modules
my-friends-flake.homeModules.neovim
];
};
};
}
Thank you. I will try this soon. But this seems to be exactly what I wanted.