chore(wyoming): remove unneeded service override
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
a33fc66b15
commit
ff6b5c753e
1 changed files with 22 additions and 38 deletions
|
@ -4,31 +4,15 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.lists) map;
|
||||
inherit (lib.modules) mkForce mkIf mkOverride;
|
||||
inherit (lib.strings) concatMapStringsSep concatStringsSep optionalString;
|
||||
inherit (lib.attrsets) attrNames nameValuePair filterAttrs listToAttrs;
|
||||
|
||||
cfg = config.services.wyoming;
|
||||
in {
|
||||
config = let
|
||||
forkedPkg = import ./pkgs/wyoming-openwakeword.nix pkgs;
|
||||
|
||||
whisperUnitNames = attrNames (
|
||||
filterAttrs (_: v: v.device == "cpu") cfg.faster-whisper.servers
|
||||
);
|
||||
in {
|
||||
systemd.services =
|
||||
# https://github.com/felschr/nixos-config/blob/6a0f0bf76e3ae80c1e180ba6f6c7fd3b8e91d2d3/services/home-assistant/wyoming.nix#L29
|
||||
mkIf (cfg.faster-whisper.servers != {})
|
||||
(listToAttrs (map (x:
|
||||
nameValuePair "wyoming-faster-whisper-${x}" {
|
||||
serviceConfig.ProcSubset = mkForce "all";
|
||||
})
|
||||
whisperUnitNames))
|
||||
#
|
||||
# openWakeWord
|
||||
// mkIf (cfg.openwakeword.enable) {
|
||||
systemd.services = mkIf (cfg.openwakeword.enable) {
|
||||
wyoming-openwakeword.serviceConfig = {
|
||||
MemoryDenyWriteExecute = mkForce (cfg.openwakeword.package != forkedPkg);
|
||||
|
||||
|
|
Loading…
Reference in a new issue