From 33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 7 Apr 2016 12:38:02 +0200 Subject: [PATCH] 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 --- nixos/modules/services/misc/taskserver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index 793cc2aa36bb..9cda787ae1a4 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -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 = ''