diff --git a/modules/nix-darwin/default.nix b/modules/nix-darwin/default.nix index c98c669..2426f39 100644 --- a/modules/nix-darwin/default.nix +++ b/modules/nix-darwin/default.nix @@ -273,6 +273,13 @@ in The garbage collection strategy used by Determinate Nixd. `automatic` means that Determinate Nixd automatically collects garbage in the background while `disabled` means no garbage collection. ''; }; + telemetry.sentry.endpoint = lib.mkOption { + type = types.nullOr types.str; + default = "unset"; + description = '' + The Sentry endpoint for uploading crash reports. Set to `null` to disable crash reporting. + ''; + }; }; }; default = { }; @@ -778,9 +785,14 @@ in ] ] ); + configAttrs = + explicitlySetAttrs + // lib.optionalAttrs (dnixd.telemetry.sentry.endpoint != "unset") { + telemetry.sentry.endpoint = dnixd.telemetry.sentry.endpoint; + }; in - lib.mkIf (explicitlySetAttrs != { }) { - text = builtins.toJSON explicitlySetAttrs; + lib.mkIf (configAttrs != { }) { + text = builtins.toJSON configAttrs; }; # List of machines for distributed Nix builds in the format