nixos/taskserver: Fix type for client.{allow,deny}

We already document that we allow special values such as "all" and
"none", but the type doesn't represent that. So let's use an enum in
conjuction with a loeOf type so that this becomes clear.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2016-04-07 12:38:02 +02:00
parent 2d89617052
commit 33f948c88b
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -197,7 +197,7 @@ in {
client = {
allow = mkOption {
type = types.listOf types.str;
type = with types; loeOf (either (enum ["all" "none"]) str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
description = ''
@ -220,7 +220,7 @@ in {
};
deny = mkOption {
type = types.listOf types.str;
type = with types; loeOf (either (enum ["all" "none"]) str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
description = ''