587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
48 lines
756 B
Nix
48 lines
756 B
Nix
{ lib
|
|
, extendModules
|
|
, ...
|
|
}:
|
|
|
|
let
|
|
inherit (lib)
|
|
mkOption
|
|
mkOverride
|
|
types
|
|
;
|
|
in
|
|
{
|
|
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; }
|
|
|
|
|
|
];
|
|
}
|