depot/third_party/nixpkgs/lib/tests/modules/extendModules-168767-imports.nix

49 lines
756 B
Nix
Raw Normal View History

{ 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; }
];
}