diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix index fc97d4f63e6c..a80f7dfafaa8 100644 --- a/nixos/modules/services/monitoring/collectd.nix +++ b/nixos/modules/services/monitoring/collectd.nix @@ -46,6 +46,20 @@ in package = lib.mkPackageOption pkgs "collectd" { }; + finalPackage = lib.mkOption { + readOnly = true; + default = minimalPackage; + defaultText = lib.literalExpression '' + if config.services.collectd.buildMinimalPackage then + cfg.package.override { + enabledPlugins = [ "syslog" ] ++ builtins.attrNames cfg.plugins; + } + else + cfg.package + ''; + description = "The final package being used after applying plugins and minimalPackage."; + }; + buildMinimalPackage = lib.mkOption { default = false; description = ''