Files
nix-config/modules/nixos/homeassistant/services/esphome/default.nix
mjallen18 9ad581f0e5 nuc
2026-03-16 17:20:16 -05:00

29 lines
534 B
Nix

{
config,
lib,
namespace,
...
}:
with lib;
let
cfg = config.${namespace}.services.home-assistant;
in
{
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.esphome = {
autoStart = true;
image = "ghcr.io/esphome/esphome:2026.2.4";
ports = [ "6052:6052" ];
volumes = [
"/var/lib/esphome:/config"
];
environment = {
TZ = "America/Chicago";
};
};
# Open the ESPHome dashboard port
networking.firewall.allowedTCPPorts = [ 6052 ];
};
}