2022-04-24 00:07:59 +02:00
|
|
|
{ lib
|
|
|
|
, extendModules
|
|
|
|
, ...
|
|
|
|
}:
|
2024-03-11 16:38:37 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
mkOverride
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in
|
2022-04-24 00:07:59 +02: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; }
|
|
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|