feat(genie): disable client again
genie-client causes a lot of processing power pipewire & pipewire-pulse even when idling.
This commit is contained in:
parent
225d7b4660
commit
275728d711
|
@ -14,7 +14,6 @@ in with builtins; {
|
||||||
./hardware/gpu-intel.nix
|
./hardware/gpu-intel.nix
|
||||||
./desktop/x11.nix
|
./desktop/x11.nix
|
||||||
./system/server.nix
|
./system/server.nix
|
||||||
./system/sound.nix
|
|
||||||
./modules/emailNotify.nix
|
./modules/emailNotify.nix
|
||||||
./services/mail.nix
|
./services/mail.nix
|
||||||
./services/restic/home-server.nix
|
./services/restic/home-server.nix
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
dataDir = "/var/lib/genie-server";
|
dataDir = "/var/lib/genie-server";
|
||||||
port = 3232;
|
port = 3232;
|
||||||
ociBackend = config.virtualisation.oci-containers.backend;
|
ociBackend = config.virtualisation.oci-containers.backend;
|
||||||
|
|
||||||
|
# enables embedded genie client which uses
|
||||||
|
# pulseaudio for speech recognition & replies
|
||||||
|
enableClient = false;
|
||||||
in {
|
in {
|
||||||
systemd.services.genie-init = {
|
systemd.services.genie-init = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -19,19 +24,17 @@ in {
|
||||||
image = "stanfordoval/almond-server";
|
image = "stanfordoval/almond-server";
|
||||||
ports = [ "${toString port}:3000" ];
|
ports = [ "${toString port}:3000" ];
|
||||||
environment = {
|
environment = {
|
||||||
PULSE_SERVER = "unix:/run/pulse/native";
|
|
||||||
THINGENGINE_HOST_BASED_AUTHENTICATION = "insecure";
|
THINGENGINE_HOST_BASED_AUTHENTICATION = "insecure";
|
||||||
|
} // optionalAttrs enableClient {
|
||||||
|
PULSE_SERVER = "unix:/run/pulse/native";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [ "/dev/shm:/dev/shm" "${dataDir}:/var/lib/genie-server" ]
|
||||||
"/dev/shm:/dev/shm"
|
++ optionals enableClient [ "/run/user/1000/pulse:/run/pulse" ];
|
||||||
"/run/user/1000/pulse:/run/pulse"
|
|
||||||
"${dataDir}:/var/lib/genie-server"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."${ociBackend}-genie" = {
|
systemd.services."${ociBackend}-genie" = {
|
||||||
requires = [ "sound.target" ];
|
requires = optionals enableClient [ "sound.target" ];
|
||||||
after = [ "sound.target" ];
|
after = optionals enableClient [ "sound.target" ];
|
||||||
before = [ "home-assistant.service" ];
|
before = [ "home-assistant.service" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue