Hello,
I am writing a custom service, which, as one of its options, will accept a list of submodules. The problem is that I need to be able to refer to submodule options within other of its options in order to be able to provide sensible defaults.
So something like this:
submodule = types.submodule {
options = {
foo = mkOption { <- reference this
type = types.str;
default = "val";
};
bar = mkOption {
type = types.str;
default = "${something.foo (?)}var" <- here
};
};
...
options.services.someservice = {
configs = mkOption {
type = types.listOf submodule;
default = [ ];
};
};
Is this possible?