From 164022841f4f50387986f45ae58fb98e36e3ecb2 Mon Sep 17 00:00:00 2001 From: Wael Nasreddine Date: Wed, 7 Jan 2026 17:23:31 -0800 Subject: [PATCH] nixos/ncps: Expose the analytics options of ncps --- nixos/modules/services/networking/ncps.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/ncps.nix b/nixos/modules/services/networking/ncps.nix index 88cb1c29f757..a05c542db11a 100644 --- a/nixos/modules/services/networking/ncps.nix +++ b/nixos/modules/services/networking/ncps.nix @@ -36,9 +36,8 @@ let cfg.openTelemetry.grpcURL != null ) "--otel-grpc-url='${cfg.openTelemetry.grpcURL}'") )) - ++ (lib.optionals cfg.prometheus.enable [ - "--prometheus-enabled" - ]) + ++ (lib.optional cfg.prometheus.enable "--prometheus-enabled") + ++ (lib.optional (!cfg.analytics.reporting.enable) "--analytics-reporting-enabled=false") ); serveFlags = lib.concatStringsSep " " ( @@ -108,6 +107,14 @@ in services.ncps = { enable = lib.mkEnableOption "ncps: Nix binary cache proxy service implemented in Go"; + analytics.reporting.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Enable reporting anonymous usage statistics (DB type, Lock type, Total Size) to the project maintainers. + ''; + }; + package = lib.mkPackageOption pkgs "ncps" { }; dbmatePackage = lib.mkPackageOption pkgs "dbmate" { };