repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vuls: init at 0.27.0
[NixPkgs.git]
/
lib
/
tests
/
modules
/
merge-module-with-key.nix
blob
21f00e6ef976674a2301438b51b77ac6270c2bc3
1
{ lib, ... }:
2
let
3
inherit (lib) mkOption types;
4
5
moduleWithoutKey = {
6
config = {
7
raw = "pear";
8
};
9
};
10
11
moduleWithKey = {
12
key = __curPos.file + "#moduleWithKey";
13
config = {
14
raw = "pear";
15
};
16
};
17
18
decl = {
19
options = {
20
raw = mkOption {
21
type = types.lines;
22
};
23
};
24
};
25
in
26
{
27
options = {
28
once = mkOption {
29
type = types.submodule {
30
imports = [
31
decl
32
moduleWithKey
33
moduleWithKey
34
];
35
};
36
default = {};
37
};
38
twice = mkOption {
39
type = types.submodule {
40
imports = [
41
decl
42
moduleWithoutKey
43
moduleWithoutKey
44
];
45
};
46
default = {};
47
};
48
};
49
}