From f00a7cb75e6b97835ec881e25fcd7a525fdee428 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 3 Sep 2025 05:22:37 +0200 Subject: [PATCH] nixos/wyoming/piper: add per-server CUDA toggle This is now possible with the underlying piper 1.3.0 upgrade. --- .../services/home-automation/wyoming/piper.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/services/home-automation/wyoming/piper.nix b/nixos/modules/services/home-automation/wyoming/piper.nix index e97f99b89ce1..b332c34bd926 100644 --- a/nixos/modules/services/home-automation/wyoming/piper.nix +++ b/nixos/modules/services/home-automation/wyoming/piper.nix @@ -10,6 +10,7 @@ let cfg = config.services.wyoming.piper; inherit (lib) + literalExpression mkOption mkEnableOption mkPackageOption @@ -100,6 +101,15 @@ in default = true; }; + useCUDA = mkOption { + type = bool; + default = config.cudaSupport; + defaultText = literalExpression "config.cudaSupport"; + description = '' + Whether to accelerate the underlying onnxruntime library with CUDA. + ''; + }; + extraArgs = mkOption { type = listOf str; default = [ ]; @@ -165,6 +175,9 @@ in ++ lib.optionals options.streaming [ "--streaming" ] + ++ lib.optionals options.cuda [ + "--use-cuda" + ] ++ options.extraArgs ); CapabilityBoundingSet = "";