core/lib/tests/modules/extendModules-168767-imports.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
576 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ 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; }
];
}