From 8b793d1916387c67f8eeb137789b1b41a1f94537 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 7 Apr 2016 13:20:20 +0200 Subject: [PATCH] nixos/taskserver: Rename client.{allow,deny} These values match against the client IDs only, so let's rename it to something that actually reflects that. Having client.cert in the same namespace also could lead to confusion, because the client.cert setting is for the *debugging* client only. Signed-off-by: aszlig --- .../services/misc/taskserver/default.nix | 70 +++++++++---------- 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index 58e7377ec9c5..1279e548c2a1 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -39,8 +39,8 @@ let # client ${mkConfLine "client.cert" cfg.client.cert} - ${mkConfLine "client.allow" cfg.client.allow} - ${mkConfLine "client.deny" cfg.client.deny} + ${mkConfLine "client.allow" cfg.allowedClientIDs} + ${mkConfLine "client.deny" cfg.disallowedClientIDs} # server server = ${cfg.server.host}:${toString cfg.server.port} @@ -196,45 +196,41 @@ in { ''; }; - client = { + allowedClientIDs = mkOption { + type = with types; loeOf (either (enum ["all" "none"]) str); + default = []; + example = [ "[Tt]ask [2-9]+" ]; + description = '' + A list of regular expressions that are matched against the reported + client id (such as task 2.3.0). - allow = mkOption { - type = with types; loeOf (either (enum ["all" "none"]) str); - default = []; - example = [ "[Tt]ask [2-9]+" ]; - description = '' - A list of regular expressions that are matched against the reported - client id (such as task 2.3.0). + The values all or none have + special meaning. Overidden by any entry in the option + . + ''; + }; - The values all or none have - special meaning. Overidden by any entry in the option - . - ''; - }; + disallowedClientIDs = mkOption { + type = with types; loeOf (either (enum ["all" "none"]) str); + default = []; + example = [ "[Tt]ask [2-9]+" ]; + description = '' + A list of regular expressions that are matched against the reported + client id (such as task 2.3.0). - cert = mkOption { - type = types.nullOr types.path; - default = null; - description = '' - Fully qualified path of the client cert. This is used by the - client command. - ''; - }; - - deny = mkOption { - type = with types; loeOf (either (enum ["all" "none"]) str); - default = []; - example = [ "[Tt]ask [2-9]+" ]; - description = '' - A list of regular expressions that are matched against the reported - client id (such as task 2.3.0). - - The values all or none have - special meaning. Any entry here overrides these in - . - ''; - }; + The values all or none have + special meaning. Any entry here overrides these in + . + ''; + }; + client.cert = mkOption { + type = types.nullOr types.path; + default = null; + description = '' + Fully qualified path of the client cert. This is used by the + client command. + ''; }; server = {