feat: remove genie / almond
This commit is contained in:
parent
475a56bdfd
commit
7c5e098f74
|
@ -21,7 +21,6 @@ in with builtins; {
|
||||||
# ./services/kodi.nix
|
# ./services/kodi.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./services/etebase.nix
|
./services/etebase.nix
|
||||||
./services/genie.nix
|
|
||||||
./services/website.nix
|
./services/website.nix
|
||||||
./services/home-assistant
|
./services/home-assistant
|
||||||
./services/matrix
|
./services/matrix
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
dataDir = "/var/lib/genie-server";
|
|
||||||
port = 3232;
|
|
||||||
ociBackend = config.virtualisation.oci-containers.backend;
|
|
||||||
|
|
||||||
# enables embedded genie client which uses
|
|
||||||
# pulseaudio for speech recognition & replies
|
|
||||||
enableClient = false;
|
|
||||||
in {
|
|
||||||
systemd.services.genie-init = {
|
|
||||||
enable = true;
|
|
||||||
description = "Set up paths for genie";
|
|
||||||
before = [ "${ociBackend}-genie.service" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
script = ''
|
|
||||||
mkdir -p ${dataDir}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.genie = {
|
|
||||||
image = "stanfordoval/almond-server";
|
|
||||||
ports = [ "${toString port}:3000" ];
|
|
||||||
environment = {
|
|
||||||
THINGENGINE_HOST_BASED_AUTHENTICATION = "insecure";
|
|
||||||
} // optionalAttrs enableClient {
|
|
||||||
PULSE_SERVER = "unix:/run/pulse/native";
|
|
||||||
};
|
|
||||||
volumes = [ "/dev/shm:/dev/shm" "${dataDir}:/var/lib/genie-server" ]
|
|
||||||
++ optionals enableClient [ "/run/user/1000/pulse:/run/pulse" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."${ociBackend}-genie" = {
|
|
||||||
requires = optionals enableClient [ "sound.target" ];
|
|
||||||
after = optionals enableClient [ "sound.target" ];
|
|
||||||
before = [ "home-assistant.service" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ port ];
|
|
||||||
}
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
let port = config.services.home-assistant.config.http.server_port;
|
||||||
port = config.services.home-assistant.config.http.server_port;
|
|
||||||
geniePort = 3232;
|
|
||||||
in {
|
in {
|
||||||
imports = [ ./esphome.nix ];
|
imports = [ ./esphome.nix ];
|
||||||
|
|
||||||
|
@ -76,10 +74,6 @@ in {
|
||||||
delay_time = 0;
|
delay_time = 0;
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
almond = {
|
|
||||||
type = "local";
|
|
||||||
host = "http://localhost:${toString geniePort}/me";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# configWritable = true; # doesn't work atm
|
# configWritable = true; # doesn't work atm
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue