hass: install esphome and update firewall

This commit is contained in:
Motiejus Jakštys 2023-11-14 23:36:43 +02:00
parent c4f3018a33
commit c7de1294db
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
myData, myData,
... ...
}: let }: let
@ -13,7 +14,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
mj.services.friendlyport.ports = [ mj.services.friendlyport.ports = [
{ {
subnets = myData.subnets.motiejus.cidrs; subnets = [myData.subnets.tailscale.cidr];
tcp = [myData.ports.hass]; tcp = [myData.ports.hass];
} }
{ {
@ -22,6 +23,8 @@ in {
} }
]; ];
environment.systemPackages = [pkgs.esphome]; # so it lands in PATH
services = { services = {
esphome = { esphome = {
enable = true; enable = true;
@ -52,7 +55,7 @@ in {
auth_providers = [ auth_providers = [
{ {
type = "trusted_networks"; type = "trusted_networks";
trusted_networks = [myData.subnets.tailscale.cidr]; trusted_networks = myData.subnets.motiejus.cidrs;
} }
]; ];
}; };