diff options
author | Silvan Mosberger <contact@infinisil.com> | 2022-02-22 15:52:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 15:52:19 +0100 |
commit | 67596d3fcf34ed9f8749221d0abb714069d3985b (patch) | |
tree | bffeffd1caa7669edac531b655d3737b171eb4ab /lib/types.nix | |
parent | b9ea2aacb004d929f5a76dd7c82fda1e280be0d7 (diff) | |
parent | b333395be54397a62e6befe2bc91664f53306b41 (diff) |
Merge pull request #160487 from Infinisil/emptyValueFixes
Minor fixes for `emptyValue`s
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/types.nix b/lib/types.nix index f2f9b2bca9853..3fa9d881a6502 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -390,7 +390,7 @@ rec { ).optionalValue ) def.value ) defs))); - emptyValue = { value = {}; }; + emptyValue = { value = []; }; getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]); getSubModules = elemType.getSubModules; substSubModules = m: listOf (elemType.substSubModules m); @@ -402,7 +402,7 @@ rec { let list = addCheck (types.listOf elemType) (l: l != []); in list // { description = "non-empty " + list.description; - # Note: emptyValue is left as is, because another module may define an element. + emptyValue = { }; # no .value attr, meaning unset }; attrsOf = elemType: mkOptionType rec { |