diff --git a/services/genie.nix b/services/genie.nix new file mode 100644 index 0000000..cbfd064 --- /dev/null +++ b/services/genie.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +let + dataDir = "/var/lib/genie-server"; + port = 3232; +in { + virtualisation.oci-containers.containers = { + genie = { + image = "stanfordoval/almond-server"; + ports = [ "${toString port}:3000" ]; + environment.PULSE_SERVER = "unix:/run/pulse/native"; + volumes = [ + "/dev/shm:/dev/shm" + "/run/pulse:/run/pulse" + "${dataDir}:/var/lib/genie-server" + ]; + }; + }; +} diff --git a/services/home-assistant.nix b/services/home-assistant.nix index 1aad617..52baf51 100644 --- a/services/home-assistant.nix +++ b/services/home-assistant.nix @@ -5,6 +5,7 @@ with pkgs; let port = config.services.home-assistant.config.http.server_port; mqttPort = 1883; + geniePort = 3232; in { # just installed for ConBee firmware updates environment.systemPackages = with pkgs; [ deconz ]; @@ -116,6 +117,10 @@ in { delay_time = 0; }; }]; + almond = { + type = "local"; + host = "http://localhost:${toString geniePort}"; + }; }; # configWritable = true; # doesn't work atm };