feat: add genie w/ hass integration
This commit is contained in:
parent
170612a57e
commit
c91eb45acf
19
services/genie.nix
Normal file
19
services/genie.nix
Normal file
|
@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ with pkgs;
|
||||||
let
|
let
|
||||||
port = config.services.home-assistant.config.http.server_port;
|
port = config.services.home-assistant.config.http.server_port;
|
||||||
mqttPort = 1883;
|
mqttPort = 1883;
|
||||||
|
geniePort = 3232;
|
||||||
in {
|
in {
|
||||||
# just installed for ConBee firmware updates
|
# just installed for ConBee firmware updates
|
||||||
environment.systemPackages = with pkgs; [ deconz ];
|
environment.systemPackages = with pkgs; [ deconz ];
|
||||||
|
@ -116,6 +117,10 @@ in {
|
||||||
delay_time = 0;
|
delay_time = 0;
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
almond = {
|
||||||
|
type = "local";
|
||||||
|
host = "http://localhost:${toString geniePort}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# configWritable = true; # doesn't work atm
|
# configWritable = true; # doesn't work atm
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue