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 14:21:42 +02:00
parent 2d89617052
commit 33f948c88b
@@ -197,7 +197,7 @@ in {
client = { client = {
allow = mkOption { allow = mkOption {
type = types.listOf types.str; type = with types; loeOf (either (enum ["all" "none"]) str);
default = []; default = [];
example = [ "[Tt]ask [2-9]+" ]; example = [ "[Tt]ask [2-9]+" ];
description = '' description = ''
@@ -220,7 +220,7 @@ in {
}; };
deny = mkOption { deny = mkOption {
type = types.listOf types.str; type = with types; loeOf (either (enum ["all" "none"]) str);
default = []; default = [];
example = [ "[Tt]ask [2-9]+" ]; example = [ "[Tt]ask [2-9]+" ];
description = '' description = ''