about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authortilpner <till@hoeppner.ws>2019-08-19 00:48:12 +0200
committertilpner <till@hoeppner.ws>2019-08-19 01:32:01 +0200
commit944a3a0dfc9ce548b242e253ca1e2b657bd7a07e (patch)
tree7e51069a5e8b2f2839537012d8da430f7751cc5a /nixos/modules
parent4835f65e9507bf4ba2defee4d8f1a6077b621960 (diff)
downloadnixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar.gz
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar.bz2
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar.lz
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar.xz
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.tar.zst
nixlib-944a3a0dfc9ce548b242e253ca1e2b657bd7a07e.zip
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}" \