summary refs log tree commit diff
path: root/nixos/modules/services/misc/taskserver/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-07 12:38:02 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-07 14:21:42 +0200
commit33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7 (patch)
tree7d4f2a1c3ee09edb14fe3a9af52eda158cee934d /nixos/modules/services/misc/taskserver/default.nix
parent2d8961705249a9a144e2f7d944e04fd938b4a2c9 (diff)
downloadnixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar.gz
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar.bz2
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar.lz
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar.xz
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.tar.zst
nixlib-33f948c88b0a92a629d3e19cf06ccc12d8c9c1e7.zip
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>
Diffstat (limited to 'nixos/modules/services/misc/taskserver/default.nix')
-rw-r--r--nixos/modules/services/misc/taskserver/default.nix4
1 files 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 = ''