types: loeOf -> listOf

This commit is contained in:
Eric Sagnes 2016-11-04 13:33:59 +09:00 committed by Nicolas B. Pierron
parent f74d48e9fe
commit 1fe1cdecb2
4 changed files with 4 additions and 10 deletions

View File

@ -99,12 +99,6 @@
type. Multiple definitions are merged according to the
value.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>types.loeOf</varname> <replaceable>t</replaceable></term>
<listitem><para>A list or an element of <replaceable>t</replaceable> type.
Multiple definitions are merged according to the
values.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>types.nullOr</varname> <replaceable>t</replaceable></term>
<listitem><para><literal>null</literal> or type

View File

@ -41,7 +41,7 @@ in
strings. The latter is concatenated, interspersed with colon
characters.
'';
type = types.attrsOf (types.loeOf types.str);
type = with types; attrsOf (either str (listOf str));
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
};

View File

@ -23,7 +23,7 @@ in
strings. The latter is concatenated, interspersed with colon
characters.
'';
type = types.attrsOf (types.loeOf types.str);
type = with types; attrsOf (either str (listOf str));
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
};

View File

@ -292,7 +292,7 @@ in {
};
allowedClientIDs = mkOption {
type = with types; loeOf (either (enum ["all" "none"]) str);
type = with types; either str (listOf str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
description = ''
@ -306,7 +306,7 @@ in {
};
disallowedClientIDs = mkOption {
type = with types; loeOf (either (enum ["all" "none"]) str);
type = with types; either str (listOf str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
description = ''