about summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/trafficserver
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2021-10-03 18:06:03 +0200
committerNaïm Favier <n@monade.li>2021-10-04 12:47:20 +0200
commit2ddc335e6f32b875e14ad9610101325b306a0add (patch)
tree2a4591c137cb363a6ec09f529d587a10aa7a0bc7 /nixos/modules/services/web-servers/trafficserver
parent330b1e08b8df4e1f0100a0a7810ec3157749e5ee (diff)
downloadnixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar.gz
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar.bz2
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar.lz
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar.xz
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.tar.zst
nixlib-2ddc335e6f32b875e14ad9610101325b306a0add.zip
nixos/doc: clean up defaults and examples
Diffstat (limited to 'nixos/modules/services/web-servers/trafficserver')
-rw-r--r--nixos/modules/services/web-servers/trafficserver/default.nix40
1 files changed, 22 insertions, 18 deletions
diff --git a/nixos/modules/services/web-servers/trafficserver/default.nix b/nixos/modules/services/web-servers/trafficserver/default.nix
index 341e8b13976a..706ea5bfefba 100644
--- a/nixos/modules/services/web-servers/trafficserver/default.nix
+++ b/nixos/modules/services/web-servers/trafficserver/default.nix
@@ -62,15 +62,17 @@ in
     ipAllow = mkOption {
       type = types.nullOr yaml.type;
       default = builtins.fromJSON (builtins.readFile ./ip_allow.json);
-      defaultText = "upstream defaults";
-      example = literalExample {
-        ip_allow = [{
-          apply = "in";
-          ip_addrs = "127.0.0.1";
-          action = "allow";
-          methods = "ALL";
-        }];
-      };
+      defaultText = literalDocBook "upstream defaults";
+      example = literalExpression ''
+        {
+          ip_allow = [{
+            apply = "in";
+            ip_addrs = "127.0.0.1";
+            action = "allow";
+            methods = "ALL";
+          }];
+        }
+      '';
       description = ''
         Control client access to Traffic Server and Traffic Server connections
         to upstream servers.
@@ -83,8 +85,8 @@ in
     logging = mkOption {
       type = types.nullOr yaml.type;
       default = builtins.fromJSON (builtins.readFile ./logging.json);
-      defaultText = "upstream defaults";
-      example = literalExample { };
+      defaultText = literalDocBook "upstream defaults";
+      example = { };
       description = ''
         Configure logs.
 
@@ -145,7 +147,7 @@ in
         in
         valueType;
       default = { };
-      example = literalExample { proxy.config.proxy_name = "my_server"; };
+      example = { proxy.config.proxy_name = "my_server"; };
       description = ''
         List of configurable variables used by Traffic Server.
 
@@ -197,12 +199,14 @@ in
     sni = mkOption {
       type = types.nullOr yaml.type;
       default = null;
-      example = literalExample {
-        sni = [{
-          fqdn = "no-http2.example.com";
-          https = "off";
-        }];
-      };
+      example = literalExpression ''
+        {
+          sni = [{
+            fqdn = "no-http2.example.com";
+            https = "off";
+          }];
+        }
+      '';
       description = ''
         Configure aspects of TLS connection handling for both inbound and
         outbound connections.