services.amazon-cloudwatch-agent.commonConfigurationFile
NixOS option
Amazon CloudWatch Agent common configuration. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-commandline-fleet.html#CloudWatch-Agent-profile-instance-first for supported values. commonConfigurationFile takes precedence over commonConfiguration. Note: Restricted evaluation blocks access to paths outside the Nix store. This means detecting content changes for mutable paths (i.e. not input or content-addressed) can’t be done. As a result, nixos-rebuild won’t reload/restart the systemd unit when mutable path contents change. systemctl restart amazon-cloudwatch-agent.service must be used instead.
type: absolute pathDefault
tomlFormat.generate "common-config.toml" cfg.commonConfiguration
Example
declared in: nixos/modules/services/monitoring/amazon-cloudwatch-agent.nixView source on NixOS/nixpkgs →"/etc/amazon-cloudwatch-agent/amazon-cloudwatch-agent.json"