forked from Fediversity/Fediversity
30 lines
595 B
Nix
30 lines
595 B
Nix
/**
|
|
Modular function type
|
|
*/
|
|
{ config, ... }:
|
|
{
|
|
options = {
|
|
input-type = mkOption {
|
|
type = deferredModule;
|
|
};
|
|
output-type = mkOption {
|
|
type = deferredModule;
|
|
};
|
|
function-type = mkOption {
|
|
type = optionType;
|
|
readOnly = true;
|
|
default = functionTo (
|
|
submodule (function: {
|
|
options = {
|
|
input = mkOption {
|
|
type = submodule config.input-type;
|
|
};
|
|
output = mkOption {
|
|
type = submodule config.output-type;
|
|
};
|
|
};
|
|
})
|
|
);
|
|
};
|
|
};
|
|
}
|