What do I mean?
Consider foo/flake.nix
:
{
inputs = {
nixpkgs = ...;
baz = {
url = "<url1>";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
And bar/flake.nix
(The goal I am trying to achieve):
{
inputs = barInputs: {
nixpkgs = ...;
foo = fooInputs: {
url = "...";
fooInputs.baz.url = "<url2>";
};
};
}
This isn’t possible now. The only way to do it is to create a new baz
input in bar
and make foo
follow it:
{
inputs = {
nixpkgs = ...;
baz = {
url = "<url2>";
};
foo = {
url = "...";
inputs.baz.follows = "baz";
};
};
}
Do you see the problem in this?
In foo
's flake inputs, baz
is following the foo/nixpkgs
but if we want to keep that behaviour same in baz
we will have to explicitly mention that:
{
inputs = barInputs: {
nixpkgs = ...;
baz = {
url = "<url2>";
inputs.nixpkgs.follows = "foo/nixpkgs";
};
foo = {
url = "...";
inputs.baz.follows = "baz";
};
};
}
This can be too cumbersome as soon as the number of inputs to follow grows. I haven’t thought this through… maybe a module system for flake inputs can make things simpler?