From 1fe1cdecb24de63be577a2df538da03bbe96cd1d Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Fri, 4 Nov 2016 13:33:59 +0900 Subject: [PATCH] types: loeOf -> listOf --- nixos/doc/manual/development/option-types.xml | 6 ------ nixos/modules/config/shells-environment.nix | 2 +- nixos/modules/config/system-environment.nix | 2 +- nixos/modules/services/misc/taskserver/default.nix | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 8871b02cebf..9ef7bb30a57 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -99,12 +99,6 @@ type. Multiple definitions are merged according to the value. - - types.loeOf t - A list or an element of t type. - Multiple definitions are merged according to the - values. - types.nullOr t null or type diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index f458bc39ada..8147fed39d0 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -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); }; diff --git a/nixos/modules/config/system-environment.nix b/nixos/modules/config/system-environment.nix index 3362400326d..6011e354ece 100644 --- a/nixos/modules/config/system-environment.nix +++ b/nixos/modules/config/system-environment.nix @@ -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); }; diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index 233c47684b7..ca82a733f6f 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -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 = ''