| x10an14: taking the discussion from the beginning …
If you want to declare options specific to one instance, you can do it as follow:
{ lib, ... }@toplevel:
{
config.flake.modules.foo.<fooInstance> = {config, ...}@submoduleInstance: {
options.home-manager = lib.mkOption { ... };
config.home-manager = ...;
}
}
If you want to make the home-manager option available to all instances, then your initial example is almost there, you have to redefine the foo option with the submodule that you want to add. Submodule option declarations are merged, see fileSystems option as an example, which is declared in multiple modules.
|