2024-12-10 20:26:33 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
extendModules,
|
|
|
|
...
|
2022-04-24 00:07:59 +02:00
|
|
|
}:
|
2024-03-11 08:38:37 -07:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
mkOverride
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in
|
2022-04-24 00:07:59 +02:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
|
|
|
|
{
|
|
|
|
options.sub = mkOption {
|
|
|
|
default = { };
|
|
|
|
type = types.submodule (
|
2024-12-10 20:26:33 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
extendModules,
|
|
|
|
...
|
2022-04-24 00:07:59 +02:00
|
|
|
}:
|
|
|
|
{
|
|
|
|
options.value = mkOption {
|
|
|
|
type = types.int;
|
|
|
|
};
|
|
|
|
|
|
|
|
options.specialisation = mkOption {
|
|
|
|
default = { };
|
|
|
|
inherit
|
|
|
|
(extendModules {
|
2024-12-10 20:26:33 +01:00
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
specialisation = mkOverride 0 { };
|
|
|
|
}
|
|
|
|
];
|
2022-04-24 00:07:59 +02:00
|
|
|
})
|
2024-12-10 20:26:33 +01:00
|
|
|
type
|
|
|
|
;
|
2022-04-24 00:07:59 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
{ config.sub.value = 1; }
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|