I would like to outsource a module to another git repo. In my concrete case I have a nixvim configuration that I want to use in all my nixos configurations. So my hope was that I could just have a git repo with that module in it and import it in a similar fasion to this
{
#...
inputs = {
#...
my_config.url = "github:owner/repo";
};
outputs = {self, nixpkgs, home-manager, ... }@inputs : {
nixosConfigurations = {
my-host = nixpkgs.lib.nixosSystem {
# ...
modules = [
${inputs.my_config}/some_module.nix
];
}
};
};
}
I tried numerous alternatives (which tells me that infinite recursion happens) but unfortunately did not succeed. I was also not able to find a solution for this problem online. Would be great if someone had an idea on how to achieve this