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:
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 = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user