nixos-configs/devices/homie/modules/home-assistant/firmware.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

2024-09-05 22:42:17 -04:00
{config, ...}: {
services.esphome = {
secretsFile = config.sops.secrets.esphome.path;
firmwareConfigs = {
"esp1" = {
packages.remote_package_files = {
url = "https://github.com/esphome/firmware";
files = ["voice-assistant/m5stack-atom-echo.adopted.yaml"];
ref = "0f6fad0860b8bd2c251162abde5064be1ae29546";
};
2024-09-05 22:42:17 -04:00
# Enable Home Assistant API
api.encryption.key = "!secret api_key";
2024-09-05 22:42:17 -04:00
ota = [
{
platform = "esphome";
password = "!secret ota_pass";
}
];
2024-09-05 22:42:17 -04:00
wifi = {
ssid = "!secret wifi_ssid";
password = "!secret wifi_password";
2024-09-05 22:42:17 -04:00
manual_ip = {
# Set this to the IP of the ESP
static_ip = "192.168.0.92";
# Set this to the IP address of the router. Often ends with .1
gateway = "192.168.0.1";
subnet = "255.255.255.0";
};
2024-09-05 22:42:17 -04:00
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap = {
ssid = "Esp1 Fallback Hotspot";
password = "!secret ap_fallback";
};
};
};
};
};
}