about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2019-08-19 02:28:38 +0200
committerGitHub <noreply@github.com>2019-08-19 02:28:38 +0200
commit918e1e0925c4bd26814280e9147a87291d434e9d (patch)
treec3ba6112d380b304a15aa04dc7f584641d0c5bc6 /nixos/modules
parent8227b2f29e4024a001d7602230ed893c186916b0 (diff)
parent944a3a0dfc9ce548b242e253ca1e2b657bd7a07e (diff)
downloadnixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar.gz
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar.bz2
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar.lz
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar.xz
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.tar.zst
nixlib-918e1e0925c4bd26814280e9147a87291d434e9d.zip
nixos/cadvisor: allow passing custom arguments (#66855)
nixos/cadvisor: allow passing custom arguments
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/monitoring/cadvisor.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix
index 6ca420a05b23..695a8c42e85e 100644
--- a/nixos/modules/services/monitoring/cadvisor.nix
+++ b/nixos/modules/services/monitoring/cadvisor.nix
@@ -84,6 +84,16 @@ in {
         type = types.bool;
         description = "Cadvisor storage driver, enable secure communication.";
       };
+
+      extraOptions = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        description = ''
+          Additional cadvisor options.
+          
+          See <link xlink:href='https://github.com/google/cadvisor/blob/master/docs/runtime_options.md'/> for available options.
+        '';
+      };
     };
   };
 
@@ -112,6 +122,7 @@ in {
             -logtostderr=true \
             -listen_ip="${cfg.listenAddress}" \
             -port="${toString cfg.port}" \
+            ${escapeShellArgs cfg.extraOptions} \
             ${optionalString (cfg.storageDriver != null) ''
               -storage_driver "${cfg.storageDriver}" \
               -storage_driver_user "${cfg.storageDriverHost}" \