nixos/ncps: Expose the analytics options of ncps

This commit is contained in:
Wael Nasreddine
2026-01-17 00:25:57 -08:00
parent 977f5baed3
commit 164022841f
+10 -3
View File
@@ -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" { };