mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-20 08:29:20 +03:00
45 lines
863 B
Nix
45 lines
863 B
Nix
![]() |
{ lib, ... }:
|
||
|
let
|
||
|
inherit (lib) types mkOption;
|
||
|
|
||
|
inherit (types)
|
||
|
# attrsOf uses attrsWith internally
|
||
|
attrsOf
|
||
|
listOf
|
||
|
;
|
||
|
in
|
||
|
{
|
||
|
imports = [
|
||
|
# Module A
|
||
|
(
|
||
|
{ ... }:
|
||
|
{
|
||
|
options.attrsWith = mkOption {
|
||
|
type = attrsOf (listOf types.str);
|
||
|
};
|
||
|
options.mergedAttrsWith = mkOption {
|
||
|
type = attrsOf (listOf types.str);
|
||
|
};
|
||
|
options.listOf = mkOption {
|
||
|
type = listOf (listOf types.str);
|
||
|
};
|
||
|
options.mergedListOf = mkOption {
|
||
|
type = listOf (listOf types.str);
|
||
|
};
|
||
|
}
|
||
|
)
|
||
|
# Module B
|
||
|
(
|
||
|
{ ... }:
|
||
|
{
|
||
|
options.mergedAttrsWith = mkOption {
|
||
|
type = attrsOf (listOf types.str);
|
||
|
};
|
||
|
options.mergedListOf = mkOption {
|
||
|
type = listOf (listOf types.str);
|
||
|
};
|
||
|
}
|
||
|
)
|
||
|
];
|
||
|
}
|