2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, extendModules
|
|
|
|
, ...
|
|
|
|
}:
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
mkOverride
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in
|
2022-04-27 09:35:20 +00:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
|
|
|
|
{
|
|
|
|
options.sub = mkOption {
|
|
|
|
default = { };
|
|
|
|
type = types.submodule (
|
|
|
|
{ config
|
|
|
|
, extendModules
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
options.value = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
};
|
|
|
|
|
|
|
|
options.specialisation = mkOption {
|
|
|
|
default = { };
|
|
|
|
inherit
|
|
|
|
(extendModules {
|
|
|
|
modules = [{
|
|
|
|
specialisation = mkOverride 0 { };
|
|
|
|
}];
|
|
|
|
})
|
|
|
|
type;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{ config.sub.value = 1; }
|
|
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|