mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
41 lines
698 B
Nix
41 lines
698 B
Nix
{ lib
|
|
, extendModules
|
|
, ...
|
|
}:
|
|
with lib;
|
|
{
|
|
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; }
|
|
|
|
|
|
];
|
|
}
|