nixos/modules: Remove all usages of types.string

And replace them with a more appropriate type

Also fix up some minor module problems along the way
This commit is contained in:
Silvan Mosberger
2019-08-31 18:19:00 +02:00
parent 69d58ee245
commit 478e7184f8
118 changed files with 325 additions and 324 deletions
@@ -11,7 +11,7 @@ let
graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings" {
inherit graphiteLocalSettings;
preferLocalBuild = true;
preferLocalBuild = true;
} ''
mkdir -p $out
ln -s $graphiteLocalSettings $out/graphite_local_settings.py
@@ -215,7 +215,7 @@ in {
storageAggregation = mkOption {
description = "Defines how to aggregate data to lower-precision retentions.";
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ''
[all_min]
pattern = \.min$
@@ -227,7 +227,7 @@ in {
storageSchemas = mkOption {
description = "Defines retention rates for storing metrics.";
default = "";
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ''
[apache_busyWorkers]
pattern = ^servers\.www.*\.workers\.busyWorkers$
@@ -238,14 +238,14 @@ in {
blacklist = mkOption {
description = "Any metrics received which match one of the experssions will be dropped.";
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = "^some\.noisy\.metric\.prefix\..*";
};
whitelist = mkOption {
description = "Only metrics received which match one of the experssions will be persisted.";
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ".*";
};
@@ -255,7 +255,7 @@ in {
in a search and replace fashion.
'';
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ''
[post]
_sum$ =
@@ -272,7 +272,7 @@ in {
relayRules = mkOption {
description = "Relay rules are used to send certain metrics to a certain backend.";
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ''
[example]
pattern = ^mydata\.foo\..+
@@ -289,7 +289,7 @@ in {
aggregationRules = mkOption {
description = "Defines if and how received metrics will be aggregated.";
default = null;
type = types.uniq (types.nullOr types.string);
type = types.nullOr types.str;
example = ''
<env>.applications.<app>.all.requests (60) = sum <env>.applications.<app>.*.requests
<env>.applications.<app>.all.latency (60) = avg <env>.applications.<app>.*.latency