From 59f235c79d3844a5c8baa9b1c9eacfc934561283 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 29 Jun 2025 22:14:21 +0200 Subject: [PATCH] nixos/wyoming/faster-whisper: fix eval Various issues were introduced in the latest update that required module changes. This can be attributed to an apparent lack of attention for which I apologize. --- .../wyoming/faster-whisper.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/home-automation/wyoming/faster-whisper.nix b/nixos/modules/services/home-automation/wyoming/faster-whisper.nix index 7c52cafac33a..26f7955d9b08 100644 --- a/nixos/modules/services/home-automation/wyoming/faster-whisper.nix +++ b/nixos/modules/services/home-automation/wyoming/faster-whisper.nix @@ -25,14 +25,6 @@ let inherit (utils) escapeSystemdExecArgs ; - - finalPackage = cfg.package.overridePythonAttrs (oldAttrs: { - dependencies = - oldAttrs.dependencies - # for transformer model support - ++ optionals cfg.useTransformers oldAttrs.optional-dependencies.transformers; - }); - in { @@ -280,15 +272,21 @@ in ; in mkIf (cfg.servers != { }) { - assertions = mapAttrsToList ( - server: options: { - assertion = options.useTransformers -> options.initialPrompt == null; - message = "wyoming-faster-whisper/${server}: Transformer models (`useTransformers`) do not currently support an `initialPrompt`."; - } - ); + assertions = mapAttrsToList (server: options: { + assertion = options.useTransformers -> options.initialPrompt == null; + message = "wyoming-faster-whisper/${server}: Transformer models (`useTransformers`) do not currently support an `initialPrompt`."; + }) cfg.servers; systemd.services = mapAttrs' ( server: options: + let + finalPackage = cfg.package.overridePythonAttrs (oldAttrs: { + dependencies = + oldAttrs.dependencies + # for transformer model support + ++ optionals options.useTransformers oldAttrs.optional-dependencies.transformers; + }); + in nameValuePair "wyoming-faster-whisper-${server}" { inherit (options) enable; description = "Wyoming faster-whisper server instance ${server}";