From e0b01a5abdeb3bd5969de2919f341bc97b55a656 Mon Sep 17 00:00:00 2001 From: Jakob Beckmann Date: Wed, 2 Oct 2024 07:34:23 +0200 Subject: [PATCH] feat: introduce osquery_flag to agent --- modules/kolide-launcher/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/kolide-launcher/default.nix b/modules/kolide-launcher/default.nix index 40dbff4..3639df0 100644 --- a/modules/kolide-launcher/default.nix +++ b/modules/kolide-launcher/default.nix @@ -87,6 +87,14 @@ in ''; }; + osQueryFlags = mkOption { + type = types.listOf types.str; + default = []; + description = '' + OsQuery flagsto pass via the agent. + ''; + }; + localdevPath = mkOption { type = types.nullOr types.path; default = null; @@ -124,10 +132,11 @@ in "--autoupdate_interval ${cfg.autoupdateInterval}" "--autoupdater_initial_delay ${cfg.autoupdaterInitialDelay}" ] - ++ optional cfg.insecureTransport "--insecure_transport" - ++ optional cfg.insecureTLS "--insecure" - ++ optional (!builtins.isNull cfg.localdevPath) "--localdev_path ${cfg.localdevPath}" - ); + ++ optional cfg.insecureTransport "--insecure_transport" + ++ optional cfg.insecureTLS "--insecure" + ++ optional (!builtins.isNull cfg.localdevPath) "--localdev_path ${cfg.localdevPath}" + ++ map (x: "--osquery_flag ${x}") cfg.osQueryFlags + ); Restart = "on-failure"; RestartSec = 3; };